users@glassfish.java.net

Re: Gf 3.01 ejb3.0 class path problem?

From: <glassfish_at_javadesktop.org>
Date: Fri, 29 Oct 2010 11:46:18 PDT

The library jars in the ear lib need to be visible to the sub modules, but the opposite is not true. In v2, the library and ejb jar probably happened to be loaded by the same classloader so they can see each other, but this is not something that portable application can depend on (that library jar classes see the sub module classes).

Reading the descriptions, if a class in the library jar needs to reference the POJO class, that POJO class should be moved to the library jar. And if the POJO class needs to reference an EJB, the EJB interfaces should be moved to the library jar as well (not the actual BEAN class, but just the interfaces).

Alternatively, if the class in the library jar which references the POJO class is only needed for the ejb module, you can try to move that class to the ejb jar as well.
[Message sent by forum member 'hzhang_jn']

http://forums.java.net/jive/thread.jspa?messageID=486501