I'm trying to migrate a JBoss 4.3 server to JBoss 6. I have a mix of EJB2 and EJB3 applications deployed on the server, and all classes are visible to each other (i.e. I'm not using isolation anywhere).
All the documentation I've read seems to say that JBoss 5/6 classloading, while very different from JBoss 4 classloading under the hood, should behave functionally the same by default. For EJB2s this does seem to be the case, but for EJB3s I'm seeing a clear difference.
In JBoss 4.3, when looking up an EJB service, the returned interface is loaded by the EJB application's classloader.
In JBoss 6, it works the same for EJB2s, but for EJB3s the returned interface is loaded by the client application's classloader.
So if I have a client.war, an ejb2.ear, and an ejb3.ear, I get the following results:
EJB2 Lookup from client.war
JBoss 4.3 -- classloader = ejb2.ear
JBoss 6 -- classloader = ejb2.ear
EJB3 Lookup from client.war
JBoss 4.3 -- classloader = ejb3.ear
JBoss 6 -- classloader = client.war
This happens in JBoss 6 even with no isolation and everybody using the DefaultDomain.
I'd like to configure the classloading for EJB3s to behave exactly the same way on JBoss 6 that it does on JBoss 4.3. In other words, I'd like the same behavior as the EJB2 classloading. Is this possible?