Bugs item #625277, was opened at 2002-10-18 15:17
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=625277&group_id=22866

Category: None
Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: Dani G. (danig)
Assigned to: Nobody/Anonymous (nobody)
Summary: Servlet classloader & static classes

Initial Comment:
Java version: 1.4.0,Sun Microsystems Inc.
Java VM: Java HotSpot(TM) Client VM 1.4.0-b92,Sun 
OS-System: Windows NT 4.0,x86
JBoss: jboss-3.0.3_tomcat-4.0.5

I have two ear files that are nearly identical. Each 
contains one jar file and one war file. The jar files contain 
only stateless session beans.

The only differences between the two ear files are the 
ear file name (DaniTest.ear vs DaniTest2.ear), the web 
context root (DaniTest vs DaniTest2), and the jndi 
names to which the stateless session beans in the jar 
files are bound (ie ejb/DaniTest/BookCtrl vs 
ejb/DaniTest2/BookCtrl). The web.xml files also differ by 
having two different values for an environment variable 
indicating the application name (DaniTest vs DaniTest2).

The war files contain a jar file named sfxcommon.jar in 
WEB-INF/lib. One of the classes in this jar file is 
JNDIUtil, which is an abstract utility class with static 
methods used in the servlet and throughout the EJB's to 
get instances of stateless session beans without having 
to rewrite the code to get initial contexts, narrow( ), etc. 
JNDIUtil contains a static private variable to store the 
base JNDI path to use in retrieving the EJB's, 
ie "ejb/DaniTest" or "ejb/DaniTest2".

This private static variable is initialized the first time it is 
used based on the app-name environment variable 
mentioned above. The first time JNDIUtil gets used is 
always in the servlet.

The problem is that when both DaniTest and DaniTest2 
are deployed, they *both* use the same JNDIUtil in the 
servlets, thereby both using the same base path, for 
example always "ejb/DaniTest". This causes the EJB's 
in one application to be used by the servlets in both 
applications.

The above example works on WebLogic, so my initial 
inclination is to believe that it is a bug either in Tomcat 
itself or in the JBoss code that interacts with Tomcat.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=625277&group_id=22866


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

Reply via email to