Title: Multiple EARs / Classloading / Singletons

Hi,
I'm relatively new to Jboss 3 so I may have missed something here.....

I have two EARs deployed in the same instance of JBoss3.0.0. The code libraries/EJB's are identical, the EJB's are identified by different JNDI namespaces. Inside each EAR there are identical library jars that are specified on the manifest class paths of the EJB jars contained within each EAR

Each application EAR has a singleton class that is configured differently for each EAR and all the EJBS in each EAR have access to this singleton.

However it seems that when the applications are run, there appears to be only one singleton instance per JVM rather than one singleton per EAR and hence both EARs 'use' the singleton that happens to be instantiated first.

What is going on here? I was under the impression that EARs are supposed to have their own private class loader. Does this mean I have to run each application in a separate Jboss on a separate JVM? Or do I have to start writing my own classloader which I don't really want to do.

Using Weblogic 6.1, which we are trying to migrate from, each EAR has its own singleton instance and everything works fine.


Any suggestions would be gratefully accepted.

Thanks
Graham

Reply via email to