users@glassfish.java.net

Organization within .ear question

From: <glassfish_at_javadesktop.org>
Date: Tue, 21 Sep 2010 15:02:01 PDT

I had a question about section EE.8.5.2 in the Java EE 6 specification.

I have one EJB class that extends another EJB class. These classes are housed in different jar files, and are both marked with @Stateless. This is permitted according to the EJB specification.

I am unclear on what the classloading visibility is when both of these EJB modules are located at the top level of an .ear file. It [i]seems[/i] to work: that is, EJB1.jar contains classes that extend classes contained in EJB2.jar, and though neither of them is in the lib directory, no classloading problems appear to arise.

Is this permitted by the specification? If it is [i]not[/i] permitted by the specification, then, given that the specification discourages placing module-defining-annotated classes in the lib directory, how should such a setup work?

Thanks,
Laird
[Message sent by forum member 'ljnelson']

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