Hi Anders,

I'm not quite sure about JBoss 3.2, But here we go :

AFAIK, JBoss classloading of your EAR goes as follows,
- First, loading the EJB, all it classes, beside all the jars defined in
 Class-Path entries.

- Second, Loading the WAR, and the class loader of the WAR is a *child*
of the EJB class loader in First, which means any classes available to
the parent class loader (the EJB) is available to the WAR class loader,
and this explains how your WAR knows about all the classes available to
the EJB.

This is how JBoss performs class loading AFAIK, hope this helps .

Anders Engstr�m wrote:
Hi.

I have an application that is deployed as an EAR to JBoss (3.2).

The structure of the EAR-file is (exploded):

app.ear
|
|-- META-INF
| `-- application.xml
|-- ejb-jar.jar
| |-- META-INF
| | |-- ejb-jar.xml
| | `-- jboss.xml
| `-- com
| `-- foo
| `-- service
| |-- HomeInterface.class
| |-- RemoteInterface.class
| `-- ejb
| `-- BeanImplementation.class
|-- lib
| |-- ejb
| | `-- some-ejb-related.jar
| `-- ejb-client.jar
| `-- com
| `-- foo
| `-- service
| |-- HomeInterface.class
| `-- RemoteInterface.class
`-- webapp.war
|-- META-INF
| `-- MANIFEST.MF
|-- WEB-INF
| |-- classes
| | `-- AServlet.class
| `-- web.xml
`-- index.jsp


The classpath for the EJB-module is defined in MANIFEST.MF as
"Class-Path: lib/ejb/some-ejb-related.jar".

The classpath for the WEB-module is defined in the MANIFEST.MF as
"Class-Path: lib/ejb-client.jar".

When using this setup the WebContainer is able to use the EJB as
expected, but (and this is the weird thing) even if I leave out the
classpath reference to ejb-client.jar from webapp.war the webapp is
/still/ able to use the EJB (without the bean-interfaces in the
classpath).


And worse - the webapp is able to load classes from
"some-ejb-related.jar".

Am I doing something really stupid here??

If you need more info I'll be happy to put together a simple demo EAR.

Best Regards //Anders











-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to