[jboss-user] [EJB 3.0] - Re: Multiples Jars with same EJBs

jaikiran do-not-reply at jboss.com
Wed Sep 3 10:03:44 EDT 2008


"PeterJ" wrote : I think you are running into a classloader issue.  First one EJB gets initiated, which loads the Zone and ZoneBean classes. Then when the second EJB is being initiated, the classloader notes that the classes defined by the EJBs descriptor have already been loaded.
  | 

Peter is right. That's exactly what's happening. I tested a similar setup with verbose classloading enabled. And it showed that the bean interface and the bean implementation classes are loaded only once when the first jar is being parsed. As a result, only one implementation gets used.

So as Peter suggested, you will have to:

"PeterJ" wrote : 
  | The only way I can think of to separate them is to place each EJB JAR file into its own EAR file and define a classloader repository to keep the classes separate. Of course, then you will also have to place the code that accesses the EJBs into those EAR files, and that code can access only the EJB found in that EAR (it cannot access the EJB in the other EAR).
  | 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173962#4173962

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173962



More information about the jboss-user mailing list