Important: The information in this document is obsolete and should not be used for new development.
The class WOBootstrap has been added to help WebObjects applications launch. It uses a custom class loader to dynamically load .jar files into WebObjects applications. It was primarily implemented to solve the long command path problem on Windows. It loads .jar files from a new WebObjects Extensions directory.
WebObjects Extensions Directory
Launch Scripts
Servlet Deployments
Project Builder Support
The new bootstrap class enables a new WebObjects Extensions directory. On Windows and Solaris, its path is $NEXT_ROOT/Local/Library/WebObjects/Extensions/. On Mac OS X, its path is /Library/WebObjects/Extensions/. Any .jar files in this directory will be loaded dynamically by the WOBootstrap class at runtime. Classes in those .jar files are loaded by the same class loader that loads the WebObjects classes (all the WebObjects frameworks as well as the application’s classes and frameworks). This solves a lot of class loader–related issues in WebObjects applications.
It is recommended that WebObjects-specific .jar files from the ThirdPartyJars directory that were previously placed in the Java extensions directory (/Library/Java/Extensions/ on Mac OS X) be placed instead in the WebObjects Extensions directory. There are two exceptions to this recommendation.
If you installed WebObjects Developer on Mac OS X, the JDBC and JTA drivers should still be placed in /Library/Java/Extensions/. If you have WebObjects Developer installed on Windows, the JDBC driver needs to be installed in a location specified in JavaConfig.plist. Note that the Windows JDBC driver for WebObjects Development must be the Java 1.1.8 version, not the 2.0 version.
One benefit of the launch architecture changes is that launch scripts are greatly simplified. Since the classpath is now generated at runtime and passed to the custom class loader, the classpath for the launch script is minimal. In most cases, the -classpath flag in the launch script is
-classpath WOBootstrap.jar |
This should alleviate problems relating to argument length restrictions when launching WebObjects applications on Windows.
WebObjects applications deployed in J2EE servlet containers also take advantage of the new launch architecture. The servlet adaptor dynamically loads classes in the WebObjects Extensions directory at runtime.
If deployed as a Servlet Single Deployment Directory, the WebObjects application includes an Extensions directory in the WEB-INF directory that has a copy of all the .jar files in the WebObjects Extensions directory at compile time. SSDD uses .jar files in the application-specific Extensions directory (the one in the WEB-INF directory in the application’s directory) in preference to .jar files in the global Extensions directory (in /Library/WebObjects/Extensions/).
Note that the WebObjects Extensions directory exhibits a loading behavior different from that of the WEB-INF/lib and WEB-INF/classes directories. Classes in those directories are loaded in a parent of the class loader that loads all the WebObjects classes. Classes in either WebObjects Extensions directory are loaded by the same class loader that loads all of the WebObjects classes.
Existing Project Builder applications can take advantage of the new launch architecture by simply adding a compiler setting and rebuilding. First choose Edit Active Target from the Project menu. Look for the Java Compiler Settings item and add this flag to the Other Java Compiler Settings text area:
-extdirs /Library/WebObjects/Extensions:/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Home/lib/ext |
Existing ProjectBuilderWO applications need only be rebuilt to take advantage of the new launch architecture.
Last updated: 2003-03-01