JavaFAQ Home » Java Tools
Developers of real-time Java™ applications must ensure that, during execution of their application, there are no unpredictable delays caused by class loading.
Traditionally, this problem has been resolved by manually loading classes in advance, which is an error-prone and cumbersome process that requires updating when the application is modified. Another approach is to preload all the classes, but that unfortunately takes significantly more time and space.
IBM Real-Time Class Analysis Tool for Java lets developers deploy their Java applications without manually defining classes that should be preloaded. This tool for Linux (Red Hat and SuSe) and Windows scans the Java bytecode and the classes that it uses then generates a Java source to preload and pre-compile all these classes.
IBM Real-Time Class Analysis Tool for Java provides real-time developers with a means of deploying their Java applications without manually defining the classes that should be preloaded.
In order to determine the list of classes that the application will actually use and reference, this tool scans the Java bytecode of the user's application as well as the classes that it uses. The tool then generates a Java source file containing a static method that can be called by the application to preload and, optionally, pre-compile all these classes.
This technology runs on Linux® (Red Hat or SuSE) and Windows®.
How does it work?
The tool reads the bytecode for the main method of the application and then proceeds to locate all methods that can be called by the main method. This process is repeated recursively until all methods have been loaded. Three key areas are tricky to handle:
- A method or an interface dispatch could go to many targets since Java is an object-oriented (OO) language. The algorithm is conservative and assumes all possible targets could be taken.
- A native method could call back into Java classes. The tool cannot 'see' native methods, so the application user can provide proxy classes that describe the classes reachable from these native methods. An initial set of proxy classes for the IBM JDK 5.0 JVM is provided, but it is currently incomplete.
- A set of methods that call
Class.forName () have similar problems to native methods, and a similar solution is provided: The user can provide proxy classes for these methods. Considerable effort has been made to optimize the analysis process so that it is completed in a reasonable amount of time. Several controls enable the user to cache results from previous runs for faster analysis.
In addition, a Java class interface is provided so that the user can extend and augment the general services provided by the tool.
What is real time in Java?
Real-time support, or more appropriately, support for a tightly deterministic execution environment within a JVM has become an increasingly important element of IBM’s Java strategy. The foundational base for this real-time solution is our real-time J9 Java Virtual Machine (JVM) extended with the IBM’s Metronome real-time garbage collection technology, Ahead of Time compilation (AOT), and full support for RTSJ, all executing on an RT Linux operating system currently under development.
Critical to any understanding of a real-time solution is a basic definition. The first misconception is that real-time is minimal application latency and/or maximum data throughput. These are important attributes in any mission critical system or application but real-time is foremost about determinism. This critical characteristic is the defining requirement and is not just for time epochs in the nanosecond or microsecond range but also sub-second response times on the order of hundreds of milliseconds. Nor is real-time solely for embedded applications and systems.
There is a growing need for enterprise determinism that can choreograph multiple events across a heterogeneous distributed infrastructure, ensuring a well-defined end–to–end response time. An example would be a real-time application with a periodic task that executes once a week at a precise microsecond response window with less than a 10% jitter. Therefore the need for guaranteeing deterministic behavior across a distributed enterprise is crucial for mission critical systems.
Printer Friendly Page
Send to a Friend
Search here again if you need more info!