Warning: Function registration failed - duplicate name - xslt_create in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_set_sax_handlers in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_set_scheme_handlers in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_set_error_handler in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_set_base in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_set_encoding in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_set_log in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_process in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_error in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_errno in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_free in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_set_object in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_setopt in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_getopt in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_backend_version in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_backend_name in /home/avernet/public_html/misc/controller.php on line 2

Warning: Function registration failed - duplicate name - xslt_backend_info in /home/avernet/public_html/misc/controller.php on line 2

Warning: xslt: Unable to register functions, unable to load in Unknown on line 0
J2EE Enterprise Application Packaging

J2EE Enterprise Application Packaging

Alessandro Vernet
December, 2002

Support Classes Packaging in WebLogic

I am deploying an application as an EAR in Weblogic 6.0. I have a WAR and a whole bunch of EJBs (jars) in the EAR. My question is: where should I put the classes (jar files) that I both want to use from the WAR and the EJBs? (Putting those in the system classpath is not an option here.)

When an EAR containing EJBs and a WAR is deployed in WebLogic 6, WebLogic creates two class loaders. The first one is used to load all the EJBs. The second one is used to load the WAR. The EJB class loader is the parent of the WAR class loader. This means that every class visible from the EJB is also visible from the WAR.

To make sure that a library (say library.jar) can be used from all the EJBs and the WAR, include library.jar in the EAR and modify the manifest of each EJB JAR file to add this line:

Class-Path: library.jar

In fact, since all the EJBs are loaded with the same class loader, you just need to include the above Class-Path line in the first EJB loaded by WebLogic. So if you don't want to include the Class-Path line in the manifest of every EJB JAR, you can just put it in one of the EJB JAR and make sure that this EJB JAR is loaded first using the DeploymentOrder attribute of the EJBComponent in your WebLogic config.xml.