While the process of switching to WebLogic JRockit 8.1 JVM from another JVM is relatively easy and generally problem-free, you might encounter some known issues while or after making this switch. This section describes some of those issues and describes some simple workarounds. The issues that might occur are:
Start by ensuring that your environment variables are set up correctly. Make sure that you have set your
JAVA_HOME environment variable correctly, i.e. set to the directory where WebLogic JRockit has been installed, and that
"%JAVA_HOME%\bin" is available in your
PATH environment variable before any other directory where any version of java.exe may exist. When running applications as Windows services it is crucial that you set these environment variables system wide. To do this:
Applications are often started via scripts. Make sure that none of the startup scripts includes non-standard startup options for java. See Tuning WebLogic JRockit 8.1 JVM for complete documentation of standard and non-standard options.
Java programs are compiled into byte code by a Java compiler. Many JVMs, including the Sun JVM, interprets this byte code each time it is executed. WebLogic JRockit, however, uses code generation technology to generate native machine code from the byte code. This is sometimes called Just-In-Time (JIT) compilation. The code generation step imposes an initial time penalty before execution. Normally, the subsequent execution of the code is faster than interpreting the byte code. WebLogic JRockit is optimized for server applications that normally run for long periods of times. The initial time penalty is normally negligible in comparison to the performance gains of code generation over time.
The Java programming language relies on a mechanism called garbage collection (GC) to free memory when it is no longer being used. There is no equivalence to the
delete operator in the C++ programming language or the
free function in the C programming language. Any Java virtual machine must include a garbage collector that handles the task of finding unreferenced objects, possibly invoke their finalizers and free the memory used to hold their state.
The WebLogic JRockit garbage collectors are described in Selecting and Running a Memory Management System in Using WebLogic JRockit 8.1 SDK. Generally, the WebLogic JRockit garbage collection implementations trade high memory usage for speed and minimal program wide halts; that is, acquiring system wide locks.
This might be related to the Slow-to-Start Applications above. Scripts or other programs may start many Java processes and may therefore experience bad performance compared to the Sun JVM, since WebLogic JRockit has a code generation penalty when starting up. When starting many Java processes and running them only for a short time, this penalty can become significant.
You may be experiencing synchronization bugs in your application. It is not uncommon that such bugs are revealed when switching JVMs. The Java Virtual machine specification and the Java language specification leaves plenty of room for optimization that may cause unsynchronized access to shared data, to cause different behavior on different JVMs.
Verification ensures that the binary representation of a class or interface is structurally correct. For example, it checks that every instruction has a valid operation code; that every branch instruction branches to the start of some other instruction, rather than into the middle of an instruction; that every method is provided with a structurally correct signature; and that every instruction obeys the type discipline of the Java programming language.
In an early version of JTidy from Apache Software Foundation, the compiler had incorrectly inlined a reference to a private variable belonging to an outer class. This caused an exception to be thrown since WebLogic JRockit does stricter verification than the Sun JVM is. The old
Tidy.jar should be replaced with the new and correctly compiled version.
The quick answer to this problem is: if you are using
jk_nt_service, do everything that you need to do for the Sun JVM, then exchange the non-standard Sun JVM
-Xrs startup option with the non-standard WebLogic JRockit
-Xnohup in the
wrapper.properties configuration file. The rest of this answer is a slightly more detailed description of this.
Many people use the
jk_nt_service windows service wrapper to run java applications; for example, Jakarta Tomcat, as a Windows service (see http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/). Independently of what Windows service you may be using you must make sure that it is not using any non-standard startup options. When using
jk_nt_service, the startup is defined in:
wrapper.tomcat_homemust be set with the installation directory of tomcat
wrapper.java_homemust be set to the same value as the
wrapper.cmd_linedefines the startup command. At the time of writing, this property should be set to:
This version of WebLogic JRockit does not support the /3GB option. It will be supported in the next release. I you want to use this feature—with the understanding that it is not supported, use the Microsoft Visual Studio tool,
java.exe to enable it.
Physical Address Extension provides the possibility to map physical memory into your process virtual memory address space. At any given time, you can still have just 2 GB mapped (3 GB with the /3GB option; see Support for the /3GB Windows Startup Option for limitations of this option with this version of WebLogic JRockit); that is, you have to re-use a portion of the virtual address space to map different portions of the physical address space. Therefore you cannot simply address more memory with regular pointers. This does not work well with a normal Java heap, which uses 32-bit pointers to reference objects and needs the entire heap in the virtual address space at all times.
PAE works well with applications that can jointly control mapping and memory access. At this point this is not well suited for Java. However a native database driver might use PAE to cache data. You should discuss with the various database vendors how to make this happen (if it is not available already). You might even create a custom cache by rolling your own "DB access layer" on top of a native database API using JNI.
As described by the Java Virtual Machine Specification:
"The Java virtual machine is the cornerstone of the Java and Java 2 platforms. It is the component of the technology responsible for its hardware- and operating system- independence, the small size of its compiled code, and its ability to protect users from malicious programs."
The WebLogic JRockit JVM from BEA systems is optimized for reliability and performance for server side applications. To achieve this, WebLogic JRockit uses technologies such as code generation, hot spot detection, code optimization, advanced garbage collection algorithms and tight operating system integration.
No! You should not write your applications in any other way for WebLogic JRockit than you should for any other JVM. You should, however, design and implement your applications well in order for them to run well on WebLogic JRockit.
We don't recommend it. Thin threads is an alternative to the traditional 1:1 thread mapping model. It may offer improved scalability and performance if used with an application with many (for example, greater than 100 threads); you may want to try this threading implementation if your application is so characterized. Please note, however, that thin threads is experimental in this release.