JAVA OLYMPUS.com


aa Contact Us aa Home aa About Us aa Sign Up aa Free Java Books aa Java Books




JAVA PERFORMANCE

   
JAVA 2
Subcategories

JAVA LANGUAGE
   Getting Started
   Java Fundamentals

J2SE
   Annotations
   Applets
   Auto Boxing
   AWT
   Beans
   Collections
   Ennumerated Types
   Exceptions
   Garbage Collection
   Generics
   Immutable Types
   Internationalization
   JNI
   JVM
   I/O
   Logging
   Preference
   Reflection
   Serialization
   RunTime (JRE)
   Threads
  Database Access
   JDBC
   SQLJ
   JDO
  JFC
   J2D
   Drag & Drop
   Swing
  Media
   J2D
   J3D
   JAI
   JMF
   JTAPI
   IMAGE I/O
   SDT
   Sound (JSAPI)
   Speech
  Networking
   CORBA
   JNDI
   IDL
   RMI/IIOP
   Sockets
  Security
   JAAS
   JCE
   JSSE

JINI
   Spaces

OTHER
   Java Agents
   Java Performance
   Java Design
   AOP
   Java Certification


JAVA NETWORK
   JavaOlympus
   J2EEOlympus
   JSPOlympus
   J2meOlympus











Object Creation "I thought that I didn't need to worry about memory allocation. Java is supposed to handle all that for me." This is a common perception, which is both true and false. Java handles low-level memory allocation and deallocation and comes with a garbage collector. Further, it prevents access to these low-level memory-handling routines, making the memory safe.
Java Performance Programming Part 1 Excessive object creation can be a huge problem in Java programs. Despite continuing improvements in JVM technology for memory management, the object creation and garbage collection cycle is still a very expensive operation.
Java Performance Programming Part 2 Type-specific code is not just faster than code with type casts; it's also cleaner and safer. Unfortunately, Java sometimes makes it difficult to avoid the use of casting.
Java Performance Programming Part 3 Collections are among the most widely used programming constructs, so poor performance in this area can have repercussions throughout your code.
Collections Performance This page provides supplemental information for the February 2000 JavaWorld article "Java performance programming, Part 3: Managing collections". It'll be updated from time to time with additional information and updated results.
Performance Planning for Managers This article presents a ten point plan for ensuring that your application will perform adequately. It isn't restricted to Java (point 2 includes extra information for Java projects). I'm very grateful to Alex Rossi of Accenture for his valuable input in discussions about performance planning.
Optimizing Hash Functions For a Perfect Map Maps that are hash tables are normally implemented using a hash function which maps a data item (the key) into an indexing table.
Optimize a query on a Map In this article, Jack Shirazi works through optimizing queries on Map classes. He uses a variety of performance-tuning techniques, showing the reasons some succeed while others fail. The techniques are directly applicable to most queries, and the results of those techniques show up to a tenfold speed increase.
Java Performance: Efficiently Formatting Doubles In my book Java Performance Tuning, I considered efficient ways to convert numbers to strings, and I provided conversion algorithms that are faster than those released with the Java SDK (up to and including version 1.3). In this article, I'll consider how to format doubles using a variation of that conversion algorithm, and show that the conversion of numbers with formatting can be faster than the original unformatted conversion.
NBIO: Nonblocking I/O for Java is a library which implements nonblocking I/O facilities for Java. Surprisingly, the standard JDK libraries (as of JDK 1.3) do not provide nonblocking I/O. This means that in order to implement applications (such as web servers and other Internet services) which support many concurrent I/O streams, a large number of threads must be used. However, the overhead of threading (in Java, as well as more generally) limits the performance of such an implementation.
Design for performance, Part 1: Interfaces matter Many common Java performance problems stem from class-design decisions made early in the design process, long before most developers even start thinking about performance. In this series, Brian Goetz discusses some common Java performance hazards and how to avoid them at design time.
Design for performance, Part 2: Reduce object creation Many common Java performance problems stem from class design decisions made early in the design process, long before most developers even start thinking about performance. In this series, Brian Goetz discusses some common Java performance hazards and how to avoid them at design time. In Part 2, he discusses some techniques for reducing temporary object creation
Design for performance, Part 3: Remote interfaces Many common Java performance problems stem from class design decisions made early in the design process, long before most developers even start thinking about performance. In this series, Brian Goetz discusses some common Java performance hazards and explains how to avoid them at design time. In this article he examines performance issues specific to remote applications.
JavaTM Performance Tuning and Java Optimization Tips This paper illustrates practical ways you can improve JavaTM performance, and presents 30 Java performance tuning and Java efficiency techniques. These techniques focus on Java language and library features. Performance is defined to include both speed and space issues, that is, how to make your programs run faster, while using less memory and disk space.
Architect's Corner Integrating load testing with software development WELCOME TO THIS installment of the "Architect's Corner." This month we examine how an enterprise Java technology development project can mitigate the risk of not achieving its performance and scalability objectives.
JDBC Performance Tips In recent years, the AS/400 interface for native JDBC has become very popular. As more and more Java applications come to the platform, there is a growing need for more information on performance hints, and coding techniques. This article will provide some tips on getting the best performance from Java applications that use JDBC.
Full-Screen Exclusive Mode API Do you want to use high-performance graphics in the Java development environment? Have you always wanted to program a game, but your images wouldn't move fast enough? Has your slide show program not worked properly because you had no control over the user's display resolution? If you've been asking any of these questions, then the full-screen exclusive mode API may be what you're looking for.
Java performance tuning on hp-ux This release provides the tools for developing and deploying Java applications on HP 9000 Enterprise Servers, HP 9000 Workstations, and HP Visualize Workstations with HP-UX 11.0 and 11.11. Version 1.3 includes significant performance and functionality enhancements. The initial 1.3.0 release contains the HotSpot 1.0.1 VM.
Tuning JavaTM I/O Performance This article discusses and illustrates a variety of techniques for improving JavaTM I/O performance. Most of the techniques center around tuning disk file I/O, but some are applicable to network I/O and window output as well.
Designing Entity Beans for Improved Performance If you've done any work with Enterprise JavaBeansTM components, and particularly if you have used entity beans to model persistent data in a database, then you are most likely aware of the network performance overhead that can come with entity bean usage.
Java I/O Performance BOTH client and server programs often use the java.io package. While this package is designed with ease of use in mind, developers new to the platform often make mistakes that can lead to poor I/O performance. Fortunately, a better understanding of this package can lead to major improvements in I/O performance.
Swing Models and Renders THE Java Foundation Classes (JFC) Swing toolkit (Swing) provides a compre-hensive set of classes for creating highly interactive graphical user interfaces with the Java platform. Swing is highly flexible, but also quite complex. While novice programmers can successfully use Swing to create basic graphical user interfaces (GUIs), to create a truly complex, professional-quality GUI you must understand Swings architectural underpinnings.
Binaries vs Byte codes For some time I have been working on an article on Sun's upcoming MAJC processor architecture, which has some pretty significant enhancements to improve the speed of Java code.
Tips and tricks for better Java performance Part 1 Ever since the Java language was released in 1995, many different people, from developers to CEOs, have expressed their concern about its performance. I have heard, and even seen, people choose less appropriate technologies for a solution because of these concerns.
Tips and tricks for better Java performance Part 2 This article addresses solution performance by discussing object reuse in a solution. It provides some basic examples that demonstrate the design of a solution which incorporates object reuse.
Java Performance Report This work aims to investigate the performance of the Java platform. Developers needing high performance support for demanding applications require detailed information on the efficiency of each VM or other alternative. Benchmark data is easily achievable, by downloading a number of free benchmark programs, or by reading technical publications.
Tips and Tricks for writing Java for Performance This work aims to investigate the performance of the Java platform. Developers needing high performance support for demanding applications require detailed information on the efficiency of each VM or other alternative. Benchmark data is easily achievable, by downloading a number of free benchmark programs, or by reading technical publications.
Why Java Will Always Be Slower than C++ Anybody that has ever used a non-trivial Java program or has programmed in Java knows that Java is slower than native programs written in C++. This is a fact of life, something that we accept when we use Java.
Sun Boots Java Performance
C++ vs Java Performance In 1995, Sun Microsystems released Java, a multipurpose, object oriented programming language, and, since that time, the application development community has heard many rumors about the new language.
Java Performance Comparison with C/C++ Although some general performance comparisons of Java and C/C++ had been done previously, I wanted to look at how the performance matched up for some specific types of operations. To accomplish this I developed several test programs with parallel Java and C++ implementations, using the same algorithms and (as far as possible) the same code for the two versions of each program.
Performance in General This chapter considers the relationship of performance considerations to the coding process and introduces a way of categorizing perfor-mance problems that will be used throughout this book.
JVM Performance Comparison On Solaris, JavaSoft provides a reference JVM implementation, while SunSoft provides a production version tuned for Solaris. The production version by default uses Solaris native threads instead of green threads. The JavaSoft Win32 implementation include a Symantec JIT, which will be tested this weekend.
Java Optimization Resources I started this page because there no other web resources on how to optimize Java.
Java Performance : Optimizing String Processing Glen McCluskey is a consultant with 15 years of experience and has focused on programming languages since 1988. He specializes in Java and C++ performance, testing, and technical documentation areas.
JavaTM Performance on SPARC-based Desktop Systems Java Performance on 200 MHz Desktop Machines SunTM desktop systems deliver the fastest JavaTM performance on 200 MHz-class desktop machines. Test results submitted by Sun to Pendragon Software using its CaffeineMarkTM Release 2.5 Web applet show that a SPARC-based 200 MHz system out-performs its nearest competitor by 245 percent.
Measuring Java Performance I finished the demonstration, mentally making a note to buy a round for the engineering staff for getting the demo up and running two days after having moved our offices. I could see that the man sitting across from me, a founder of one of Japan's largest electronics concerns, was formulating a question. "Your architecture is Java," He said, "I am concerned about the performance." I should have guessed.
Micro-Tuning Step-by-Step Micro-tuning is a term often used to mean speeding up small sections of code out of context, by profiling and analyzing that code and using some of the many techniques available to make code run faster.
Performance tuning in summary The following summarizes tuning experiences I've had with development teams that had various levels of tuning experience. These summaries may help provide you with a broad outline for creating your tuning strategy. I've categorized the teams into five levels from no experience to fully competent. Note that these are summaries, not actual reports, so no summary corresponds to any single development team I have worked with.
Tuning JDBC: Measuring JDBC performance Java Database Connectivity (JDBC) is used extensively by many Java applications. In this article, the first of a series on performance-tuning JDBC, I look at how to measure the performance of JDBC and how to identify which parts of your JDBC subsystem need optimizing.
Catching OutOfMemoryErrors to Preserve Monitoring and Server Processes Why would you want to catch an OutOfMemoryError? If an OutOfMemoryError is generated by the JVM, there is not much you can do, so what use is the OutOfMemoryError?
Integrating load testing with software development WELCOME TO THIS installment of the "Architect's Corner." This month we examine how an enterprise Java technology development project can mitigate the risk of not achieving its performance and scalability objectives.
performance tuning Java on hp-ux (techniques, tools, and tips) WWelcome! This site provides techniques, tools, and information to help you improve the performance of your Java-based applications. Optimum performance of your Java applications on HP hardware can be achieved by tuning the operating system and the JVM for the characteristics of your application. Working through the Java performance tuning process allows you to tune your Java application for exceptional performance on HP hardware.
Robust event logging with Syslog Because event logging is often an afterthought, Java developers often ignore this task while programming. However, logging allows developers to instrument their code so the operations staff can deal with any problems that arise. In this article, Nate Sammons introduces Syslog, a robust logging system that divorces the act of logging an event from the handling of that event. You'll learn how to easily integrate the Syslog package into your Java programs and how to leverage Syslog as an integral part of new system development
Informationen rund um Java und Performance Willkommen auf der neuen Prdsenz www.Bastie.de Auf dieser Internetprdsenz finden Sie neben Informationen zu mir auch Informationen und Links zu der Programmiersprache Java und insbesondere zu der Mvglichkeit performante (schnelle, kleine, resourcenschonende) Anwendungen mit Java zu erstellen. Diese Informationen stehen Ihnen teilweise auch offline zur Verf|gung. Laden Sie zu diesem Zweck das Dokument "Make Java - Performance" auf Ihren Computer. Dieses Dokument steht im PDF-Format bereit.
Not using garbage collection Java is a garbage-collected run-time system, which frees the programmer from manually tracking allocation and deallocation of memory. However, as in manually managed systems, performance can be improved if you think ahead about the quantity of allocations your program will generate.
Get smart with proxies and RMI RMI enables developers to either get a remote reference to a distributed object, in which all method calls are forwarded to the server object, or get a copy of the remote object and invoke on it locally. Sometimes, however, it is desirable to combine those approaches, so that some method calls execute locally, while others execute on the remote object. This article describes a method to accomplish that in a way that is transparent to the client code.
WebSphere Application Server Development Best Practices for Performance and Scalability This white paper describes development best practices for both Web applications containing servlets, JavaServer (JSP) files, and JDBC connections, and enterprise applications containing EJB components. The table below lists the Best Practices by category assigning each practice a relative importance rating from 1 to 5. The ratings are based on degree of performance impact and on frequency of occurrence.
A Methodology for Production Performance Tuning This paper is intended for IT specialists or application administrators who set up production e-business solutions with IBM. Websphere. Application Server Advanced or Standard Editions. This paper assumes that the reader is familiar with the WebSphere product, as well as the basic concepts of Web serving and Java  technology.
WebSphere V3 Performance Tuning Guide This redbook will help you to design and configure WebSphere Application Server V3.02 for AIX, Solaris, and Windows NT for better performance. The main tuning objectives for WebSphere are to improve performance, response time, and resource utilization.
Plant your data in a ternary search tree The ternary search tree (TST) provides a fast and flexible approach to storing data. In this article, Wally Flint shows you how to use the TST with Java to build an English dictionary that matches words and checks spelling. In addition, he shows how to use a TST to construct a database and an array that can assume any size or dimension on the fly.
OPTIMIZING J2ME APPLICATION SIZE The J2ME Tech Tips are written by Eric Giguere (http://www.ericgiguere.com), an engineer at iAnywhere Solutions, inc. Eric is the author of the book "Java 2 Micro Edition: Professional Developer's Guide" and co-author of the book "Mobile Information Device Profile for Java 2 Micro Edition," both books in John Wiley & Sons' Professional Developer's Guide series.
A Test of JavaTM Virtual Machine Performance Prior to Version 1.3, production releases of the JavaTM 2 SDK, Standard Edition for the SolarisTM Operating Environment included a virtual machine1 implementation known as Exact VM (EVM). With the release of Java 2 SDK, Standard Edition 1.3, EVM is replaced by the Java HotSpotTM Server VM and the Java HotSpotTM Client VM. The Java HotSpot Client and Server VMs are designed to deliver a high level of performance for Java technology-based applications, in many cases a higher level of performance than these applications could achieve with EVM. However, as is true for most performance-enhancing tools, the performance of an application can also depend on other factors such as VM options specified at runtime.
Application Modeling and Performance Tuning from a GC Perspective, Using a SIP Network Server In this Developer's Notebook, we detail our analysis, findings, and tips or techniques for solving the "big pauses, low throughput" problem faced by most applications today in the soft-switch vertical market. We focus our discussion on the various garbage collection (GC) models in the virtual machine (VM) that we used.
High Performance Graphics Performance is always an issue for graphics programs. Rendering complex shapes and patterns on a display requires iterating through the pixels and calculating values for each of them. Loading an image and performing a filter operation on it sometimes requires allocating a large block of memory. When using these complex shapes, patterns, and images in an animated application, fast and reliable rendering can be difficult to acheive.
FREQUENTLY ASKED QUESTIONS ABOUT THE JAVATM HOTSPOT VIRTUAL MACHINE This FAQ answers common questions about JavaTM HotSpot Technology and about performance in general. Unless otherwise noted, all information on this page applies to both the Java HotSpot Client VM and the Java HotSpot Server VM.
PERFORMANCE DOCUMENTATION FOR THE JAVATM HOTSPOT VIRTUAL MACHINE This document provides information on the command-line options and environment variables that can affect the performance characteristics of the Java HotSpot Virtual Machine. Unless otherwise noted, all information in this document pertains to both the Java HotSpot Client VM and the Java HotSpot Server VM.
IBM WebSphere Application Server Standard and Advanced Editions A Methodology for Production Performance Tuning This paper is intended for IT specialists or application administrators who set up production e-business solutions with IBM. Websphere. Application Server Advanced or Standard Editions. This paper assumes that the reader is familiar with the WebSphere product, as well as the basic concepts of Web serving and Java  technology.
The Hotspot Virtual Machine How Hotspot Can Improve Java Program Performance and Designs This article, while not part of the Design Techniques column, discusses a topic that is closely related to the column's focus: performance. This article describes the "popular lore" that aims to improve the performance of Java programs in ways that reduce the flexibility of the code, and describes Sun's Hotspot JVM in technical detail. The article shows how Hotspot attempts to eliminate the performance bottlenecks that gave rise to the "popular lore" in the first place.
Make Java Performance Analysis: in German
Tuning JavaTM I/O Performance This article discusses and illustrates a variety of techniques for improving JavaTM I/O performance. Most of the techniques center around tuning disk file I/O, but some are applicable to network I/O and window output as well. The first set of techniques presented below cover low-level I/O issues, and then higher-level issues such as compression, formatting, and serialization are discussed. Note, however, the discussion does not cover application design issues, such as choice of search algorithms and data structures, nor does it discuss system-level issues such as file caching.
Track Performance of Distributed Systems I have been grappling with the problem of distributed logging and instrumentation in hegemonous enterprise systems for years. I've tried using log files. I've tried using O/S-level logging facilities through JNI. I've tried building my own using TCP interactions. I've tried sprays and powders, and nothing seems to work!
Threading lightly: Synchronization is not the enemy When do we have to synchronize, and how expensive is it really? Unlike many other programming languages, the Java Language Specification included explicit support for threading and concurrency. While having language support for concurrency makes it easier to specify and manage constraints on shared data and the timing of operations across threads, it doesn't make the complexities of concurrent programming any easier to understand. This three-part series aims to help programmers understand some of the major issues behind multithreaded programming in the Java language, and in particular to understand the impact of thread safety on Java program performance.
Threading lightly: Reducing contention : Improve application performance by staying out of your own way In Part 1 of this series, we examined the performance overhead of uncontended synchronization. While it's common to hear that synchronized method calls can be 50 times as expensive as unsynchronized method calls, these numbers can actually be quite misleading. With each successive JVM version, overall performance has improved, and the cost of uncontended synchronization has been reduced, making the issue of uncontended synchronization overhead less significant. Contended synchronization, however, is quite expensive. Moreover, a high degree of contention is disastrous for scalability -- an application that had a high degree of contended synchronization will exhibit markedly worse performance as the load increases. This article will explore several techniques for reducing contention, and hence improving scalability, in your programs.
WebLogic Server Performance Tuning Guide This document contains information on how to tune the WebLogic Server to match your application needs. Specifically, tips and instructions are provided that will allow you to configure different operating parameters of the WebLogic Server. Information on how to tune your application running on the WebLogic Server is also provided.
Performance tuning your JDBC application The concepts involved with Java, JDBC, and DBMS processing are new to many programmers. As Java becomes more widely used, database access and database applications will become increasingly easy to implement. This document provides some tips on how to obtain the best performance from JDBC applications.
Utilities: The Logging Architecture.
The Key to EJB Design: reduce network traffic in EJB Implementations Over the past several years EJB technology has entered the software development mainstream. This new level of recognition and greater popularity brings an increase in design activities in the EJB space, such as best practices and design patterns.
Design Patterns for Building Flexible and Maintainable J2EETM Applications With the proliferation of JavaTM 2 Enterprise Edition (J2EETM) as a platform of choice for server-side applications, it is crucial for developers to share their experiences and designs. This article introduces some reusable designs you can use to build flexible and easily maintainable J2EE applications.
J2ME Benchmarking It could be argued that the clock speed of a given processing platform enables you to estimate the execution time of a user application running on that platform.
Extreme Performance Tunning There are many articles about basic performance tuning a Java application. They all discuss simple techniques such as using a StringBuffer versus using a String, and the overhead of using the synchronized keyword.
Recognizing and Eliminating Errors in Multithread Java Errors in multithreaded programs may not be easy to reproduce. The program may deadlock or encounter other thread-related errors under only very specific circumstances, or may behave differently when running different VMs.
Java's new Considered Harmful Java's new keyword is central to the language  using it in conjunction with a constructor is how objects are created. Criticizing new seems as radical and as foolish as criticizing arithmetic or variables. But criticize it I do. While I believe that new has its place  indeed, it is unavoidable  much of the time there are better alternatives. In a nutshell, the problem with new is that it fails to encapsulate object creation.
Faster apps on a better machine: Tune your IBM Developer Kit for Linux, v1.3, for faster Java application performance If you want to build and run faster Java applications on the IBM Developer Kit for Linux, version 1.3, roll up your sleeves and prepare to get dirty. This article provides hands-on instruction for profiling, monitoring, and performance tuning not only your IBM Developer Kit, but your hardware capacity, the Linux 2.2.x kernel, and your Java applications.
Embedded Java Java's strong appeal for embedded applications is sometimes offset by concerns about its speed and its memory requirements. However, there are techniques that you can use to boost Java performance and reduce memory needs, and of course the Java virtual machine you choose affects Java performance, too. You can make better-informed decisions about using Java by understanding the factors that affect its performance and selecting meaningful benchmarks for embedded applications.
Practical Java Programming Language Guide This broad-ranging guide can help students with varying levels of expertise to understand Java more completely and to maximize their coding effectiveness. This book's rules-based format examines 68 key topics on how to improve code, providing crisp, well-written examples and solutions. All of the examples and solutions are accompanied by thorough explanations for achieving a working solution. This practical approach to programming and design describes the best practices used by experienced programmers. To access the source code, register the book at the following Web site: http://www.awl.com/cseng/register
Develop a generic caching service to improve performance Java developers create applications that support thousands of concurrent users. To achieve high levels of scalability and performance for those users, applications must use services that cache resources such as lists and variables employed by multiple users. Because many developers don't know where to start when creating caching services, they often turn to third-party software to handle this seemingly complex task. In this article you will learn how to create those services yourself. The code presented here provides a caching service that is effective and ready to use
J2EE Applications J2EE applications are becoming the norm rather than the exception in today's distributed computing environment. But organizations are still facing the same issues with this technology set that they did with application models of yesteryear - how to ensure that they can scale quickly, respond dynamically, and maintain flexibility as their business environment changes.
Application Servers Metamorphosis This article explains the architecture of an application server that embraces standards such as J2EE, and focuses on ways to leverage the application server platform for caching, load balancing, scalability, and clustering services. It also provides an understanding of how to build J2EE applications, by looking at both design and runtime scenarios. It concludes with some best practices for designing and implementing enterprise applications.
Optimistic Locking pattern for EJBs Yasmin Akbar-Husain and Eoin Lane show how to construct an optimistic locking solution that produces transactionally safe EJB code, portable across all application servers. The authors implement the solution in a versioned entity bean for fail-safe concurrent updates. The Optimistic Locking pattern encourages short commit cycles, thus increasing throughput and improving performance.
Reduce, Reuse and Recycle: Reusing Objects - Part I As many of you have learned, J2ME programming is filled with some interesting challenges not faced when programming your Desktop or Server systems. When they said "Limited Device", I think many people were surprised by how limited, "limited" really is.
Reduce, Reuse and Recycle: Reusing Objects - Part II In Part I of this article, we investigated the "cost" of object creation and were able to challenge some of the prevailing opinions. Specifically we were able to show that contrary to popular belief, object pooling is not always a faster better solution then just creating a new object as required.
Animation in Java applets Many Java applets perform animation, whether it's the classic, cartoon-style animation of Duke waving, program-generated lines such as flowing sine waves, or simply moving static images across the screen. No comprehensive, direct-manipulation tools exist (yet) for creating Java animations. So it's up to the applet programmer to do all the hard work.
Performing Animation What all forms of animation have in common is that they create some kind of perceived motion by showing successive frames at a relatively high speed. Computer animation usually shows 10-20 frames per second. By comparison, traditional hand-drawn animation uses anywhere from 8 frames per second (for poor quality animation) to 12 frames per second (for standard animation) to 24 frames per second (for short bursts of smooth, realistic motion). The next few pages tell you everything you need to know to write a Java program that performs animation.
Chapter Local/Remote Issues Local/remote transparency is simple to say but harder to implement. This chapter looks at several approaches to local/remote issues from the standpoint of performance.
DESERIALIZING MARSHALLED OBJECTS When you deserialize a JavaTM object from a stream, all reference objects are deserialized as well. An important exception to this is the marshalled object, that is, an instance of the class java.rmi.MarshalledObject. The constructor of this class takes as a parameter an object to be serialized. The constructor creates a marshalled object that contains the serialized representation of the supplied object. In other words, a marshalled object is a container for the serialized representation of another object.
best Practices for Writing EJBs JavaSoft defined the Enterprise JavaBeans specification to give Java developers a foundation for building distributed business components. EJBs are Java components that implement business logic and follow a contract designated in the EJB specification. Enterprise JavaBeans live inside an EJB container that provides a set of standard services, including transactions, persistence, security, and concurrency. This means that the application programmer is freed from developing these services from scratch.
Seven Rules for Optimizing Entity Beans Entity beans provide a clear model to represent persistent business objects in applications and their design. In object models, simple JavaTM objects are normally represented in a straightforward way, but do not include the transactional persistence management functionality usually required for business objects. Entity beans not only allow the same type of modelling and thinking about business objects in an object model, but they also encapsulate persistence mechanisms while hiding all complexity behind the bean and container services. This allows applications to manipulate them as Java object references. By hiding the persistent form and persistence mechanism from any calling code, entity beans allow for creative persistence optimizations by the container, while keeping the data store open and flexible, only to be determined at deployment time.
Tips on Performance Testing and Optimization The purpose of this document is to explain how to go about performing scalability testing, performance testing, and optimization, in a typical Java 2 Enterprise Edition (J2EE) environemnt.
Swing Models and Renderers THE Java Foundation Classes (JFC) Swing toolkit (Swing) provides a compre-hensive set of classes for creating highly interactive graphical user interfaces with the Java platform. Swing is highly flexible, but also quite complex. While novice programmers can successfully use Swing to create basic graphical user interfaces (GUIs), to create a truly complex, professional-quality GUI you must understand Swings architectural underpinnings. This is especially true when using Swings more complex, renderer-based components such as JTable, JTree, JComboBox, and JList.
Algorithms and Data Structures Understanding how to choose the best algorithm or data structure for a particular task is one of the keys to writing high-performance software. If you start with the wrong algorithm, all the micro-level tuning in the world won't produce optimal results.
Object Mutability: Strings and Other Things While most objects are mutable, some are not. For example, any bean that provides a setXXX method is mutable. Immutable objects can be used to define values or attributes that you don't want to be changed. For example, the class in Listing 7-1 could be used to define mathematical concepts such as pi or the speed of light in a vacuum. A simulation might set up these values in a method called bigBang; once they are set, the immutability of the MathematicalConstant class prevents them from being modified.
Controlling Class Loading Loading too many classes can have a significant impact on the RAM footprint of your program. Fortunately, there are a number of techniques you can use to reduce the number of classes that are loaded.
RAM Footprint A program's RAM footprint can be critical to its success. A program that uses too much memory can force the operating system to rely on virtual memory. Because virtual memory is many times slower than physical RAM, relying on virtual memory can result in slow performance and a poor user experience. While developing your system, be aware of your target deployment environment and consider how much RAM will be available on machines running your software.
I/O Performance Both client and server programs often use the java.io package. While this package is designed with ease of use in mind, developers new to the platform often make mistakes that can lead to poor I/O performance. Fortunately, a better understanding of this package can lead to major improvements in I/O performance.
Measurement Is Everything The level of complexity involved in modern software systems means that no human, no matter how clever, is qualified to do a proper job of performance tuning without using some basic tools. This chapter introduces tools and techniques you can use measure the performance of your software.
The Performance Process Producing fast software is nontrivial. Performance isn't a single step in the software development process; it needs to be a part of your overall software development plan. Achieving maximum performance from your software requires continued effort throughout all phases of development, not just coding.
What Is Performance? Before we can discuss how to improve performance, it's necessary to define what performance is. This isn't as simple as it sounds-people often mean very different things when they talk about performance. There are several aspects of performance, each of which contribute to the overall performance of an application.
Java theory and practice: Understanding JTS -- An introduction to transactions The Java Transaction Service is a key element of the J2EE architecture. Together with the Java Transaction API, it enables us to build distributed applications that are robust to all sorts of system and network failures. Transactions are a basic building block of reliable applications -- it would be prohibitively difficult to write a reliable distributed application without transactional support. Fortunately, JTS does most of its work transparently to the programmer; the J2EE container makes transaction demarcation and resource enlistment nearly invisible. This first installment of a three-part series covers the basics of what transactions are and why they are critical to building reliable distributed applications
Trash talk, Part 1 One feature that distinguishes Java from other computer languages is its garbage collection abilities. In this article, Jeff Friesen introduces you to garbage collection and shows how Java's optional support for it affects your programs. While studying garbage collection, you will also learn about reachability, finalization, and resurrection.
How to Climb a B-tree Some projects go on for longer than we expect. Sometimes they even improve. One project that developed differently than I expected was an indexing program I worked on. In "Let There be an Index" (Java to Go column, October 2001), I demonstrated how you could extend the capabilities of a lightweight persistent-storage database system by defining a simple linear-array index and storing that index as an object in the database. (The database system was db4o, from www.db4o.com.) At the time, I lamented the fact that you had to read the index from the database. And, because the index was implemented as an array, you had to read the whole index from the database.
New I/0 Functionality for JavaTM 2 Standard Edition 1.4 Back in January 2000, while many people were arguing about whether the year 2000 was the last or first year of the century, life began for JSR 51 as an approved Java Specification Request (JSR). The name of that JSR is New I/O APIs for the Java Platform. Many people think of the new capabilities as just offering non-blocking I/O operations. However, the new features introduced into the JavaTM 2 Platform, Standard Edition (J2SETM), version 1.4 Beta, include many other new and interesting features. While the API certainly will offer support for scalable I/O operations for both sockets and files, you'll also find a regular expression package for pattern matching, encoders and decoders for character set conversions, and improved file system support like file locking and memory mapping. All four of these new features will be covered in this article.
Enterprise Java Connection Strategies in EntityBeans In this article, I examine the different ways to obtain database connections when developing Enterprise JavaBeans (EJBs), primarily focusing on EntityBeans with Bean Managed Persistence (BMP). I also discuss the life cycle (i.e., State Diagram) of EntityBeans. Various strategies for obtaining and releasing connections at various points in the EntityBean's life cycle are explored. Finally, I look at the advantages, as well as the disadvantages of various strategies.
Java Primer Loitering Objects and Java Framework Design ONE OF THE key objectives early in the design of Java was to create an environment that eliminated the memory management problems (such as buffer overruns, de-referencing invalid pointers, and memory leaks) that have long plagued C/C++ development. The desire to achieve this goal contributed to the decision to remove all forms of explicit memory address manipulation from the Java language, as well as eliminate any direct means of reclaiming the memory allocated to an object. The emphasis on memory safety extended to the design of the bytecode instruction set and the runtime operation of the JVM, with its checks on array bounds and reference casts and its built-in garbage collection mechanism.1 Collectively, these features have enhanced both the productivity of Java programmers and the integrity of their applications.
Optimizing JavaTM Program Performance January 30, 2001 MDR-EdO: Welcome to today's Java Live! session on optimizing JavaTM program performance. Our guest is Peter Haggar, a senior software engineer at IBM. Peter is an acknowledged expert on Java programming, and author of the book Practical Java: Programming Language Guide. He'll answer your questions about Java program performance. So let's begin. Who has the first question?
The VolatileImage API User Guide: An offscreen image is stored on a surface in memory but is not currently displayed on the screen. A surface that stores such an image is called an offscreen surface. When an application renders the offscreen image to the screen, it copies the offscreen image to the primary surface, which holds the screen contents.
Overview of RMI in the WebLogic Framework Remote Method Invocation (RMI) is the standard for distributed object computing in Java. This whitepaper describes the features of WebLogic's implementation of the JavaSoft RMI specification, and discusses the benefits of using WebLogic RMI rather than the JavaSoft reference implementation.
Improved Performance with a Connection Pool If you have heard anything about Servlets you know that one of the advantages over CGI is that a Servlet can keep information between requests and share common resources. This article describes one common use of this feature, namely a database connection pool. September 01, 1999
PERFORMING EXACT CALCULATIONS WITH FLOATING-POINT NUMBERS Suppose that you're developing an application in the Java programming language, and you need to do some financial calculations. You have some coins, and you want to add the values of the coins together to find the total value.
Handling memory leaks in Java programs Memory leaks in Java programs? Absolutely. Contrary to popular belief, memory management is still a consideration in Java programming. In this article, you'll learn what causes Java memory leaks and when these leaks should be of concern. You'll also get a quick hands-on lesson for tackling leaks in your own projects.
Compressing and Decompressing Data using JavaTM APIs Many sources of information contain redundant data or data that adds little to the stored information. This results in tremendous amounts of data being transferred between client and server applications or computers in general. The obvious solution to the problems of data storage and information transfer is to install additional storage devices and expand existing communication facilities.
High-Performance I/O Arrives Java has had to overcome many obstacles on its journey to widespread acceptance. It started as a cross- platform language that in practice wasn't truly cross platforminitially available on only two platforms. Its cross-platform nature sacrificed the ability to make use of platform-dependent features required by many enterprise applications. Billed as a network-centric language, Java initially had little to offer network programming beyond the sparse java.net package. A score of additional shortcomings threatened to keep Java from seeing widespread use; one of the most critical was performance.
The Pitfalls of Using Multicast Publish/Subscribe for EAI The marketing message one hears from proponents of multicast publish/subscribe technology is appealing--almost seductive. It promises once-only transmission of information to all interested parties regardless of the number of listeners. Business events and their data are immediately and efficiently disseminated--pushed--throughout the enterprise the moment they happen. It comes as no surprise that it is marketed as an enterprise application integration (EAI) messaging technology.
Pseudo Sessions for JSP, Servlets and HTTP Session tracking is a method for maintaining the state of a series of requests from the same user. However, this method is not a perfect solution to many situations, especially if your application needs to scale. This article discusses pseudo sessions and how they can overcome drawbacks in the session tracking method. At the end of the article you will find a project implementing the pseudo session mechanism in a bean that you can use in any JavaServer Pages (JSP) applications.
Build to Scale JMS meets JChace There's an old rule in software engineering: "Building to scale requires prior intent." Many applications delivered today fail to address scalability; they get deployed fast and sink faster as the load cripples them.
Tuning the JavaTM Runtime for "Big Iron" Welcome to today's Java Live! session. Our guests today are two key members of Sun's Java performance team: Steve Wilson and Tim Cramer. Steve is the overall manager of the team, and Tim is a senior performance engineer focusing on JavaTM virtual machine1 (JVM) performance. They'll answer your questions about Java performance, especially about tuning the Java runtime for "big iron" where you have many machines, or large machines, or many threads running. So let's begin. Who has the first question?
Under the Hood java.lang.reflect.Proxy This is not another article about the Proxy API as introduced in JDK 1.3. Well, okay, it is, but only indirectly. The Proxy API is implemented using techniques that can seem a lot like magic if you're not familiar with them.
Get disconnected with CachedRowSet The new CachedRowSet, still in early access release, provides benefits that developers can begin to take advantage of right away. Taylor Cowan demonstrates how you can use a CachedRowSet as the data model for a JavaServer Pages (JSP) entry/edit form. Assuming that you have some experience with JSP development, he describes step by step how to implement navigation, updates, inserts, and deletes using a CachedRowSet JavaBean. In addition, he shows how the CachedRowSet helps to reduce database-update SQL statements and the use of valuable database connection resources.
Load Balancing Web Applications This article offers an overview of several approaches to load balancing on Web application server clusters. A cluster is a group of servers running a Web application simultaneously, appearing to the world as if it were a single server. To balance server load, the system distributes requests to different nodes within the server cluster, with the goal of optimizing system performance. This results in higher availability and scalability -- necessities in an enterprise, Web-based application.

   J2SE Performance
Objects

Applets

AWT

Java Beans

Java Collections

Java Exceptions

Internationalization

JNI

JVM

I/O

Java Logging

Reflection

Threads

JDBC

JDO

Media

CORBA

JNDI

IDL

RMI/IIOP

Sockets

JAAS

JCE

JSEE