EJB 2 and J2EE Packaging
Subject:   J2EE packaging
Date:   2003-01-06 18:03:39
From:   anonymous2
Hello Tyler !

thanx for ur article on J2EE packaging.

I'm currently using the extension mecanism but I'm encountering the pbs to use it with jar inside a rar. I read from you that this is not supposed to work with rar files (and other composed archives) ? but shouldn't it be working for a jar file inside a rar ? also shouldn't it be working for configuration files packaged into a jar, packaged into a rar ?

I've submitted the following thread on the SUN J2EE mail group:

(I've attached a copy-paste if u can't access it, sorry if the format is kinda screwed).

it looks to me as if the extension mecanism wasn't implemented in the jar files inside the rar (although it is in ear for instance).

thank you for any comment.


SUN thread copy-paste

Hello !

I have 2 questions related to the JCA classloading through the J2EE boot system.

1. when interfacing to a legacy application, most of the time J2SE ResourceBundle and ClassLoading features are used.
ResourceBundle is not much of a pb but I encounter systematic pbs when trying to resolve a configuration file - that was
previously defined in my J2SE JVM classpath - and now out of the J2EE server classpath. I understand that the java
Classloader resolves into the JVM path (and adds some security features after v1.2).

is there a way other than overloading the J2EE classloading to resolve correctly my metadata (using ClassLoader here) ? I
have tried to include my data in the jar that contains the ClassLoader call,
both on top of the jar paht and in the java package without any success.

2. I have exactly the same problem as item 1 but with external jar files to my connector: connector is in jar 1 (inside rar)
and using classes of jar2.
the only way I've found to solve this one is to include the jar files into the (rar) jar file and to specify the jar2 into the
Class-Path manifest of this jar.

is this normal classes and data classloading are treated differently ? but also is this normal that I have to include the
external jar inside the rar ? in terms of packaging I'm gonna have to duplicate these jar files inside all the connectors that
I'll have to deploy.

I was expecting a comparable way of handling the rar classloader (done in the J2EE imp ?) coz on the J2EE server side
item2 for ear and jar files is resolved by simply specifying correctly the Class-Path in manifest files, and deploying the
standalone jar files. Including the jar files in my J2EE startup script solves the pb but raises equivalent packaging
integration issues.

thanx for any help.