I have an ear with hibernate libraries, this same ear contains hornetQ libraries (hornetq core + netty ..) to link with a remote hornetq server. If I deploy my ear without any isolation, I have errors with my hibernate queries.
So, I tried to use isolation in myEar/META-INF/jboss-app file with this code :
So, with that it seems to work, but if I put org:loader=toto.ear, (anything) it works also, my ear hibernate libraries are considered instead of jboss ones.
I don't understand why the isolation works if I put anything, the ear name should be a real deployed ear and I would have an error message telling "this ear is not deployed".
I have also an odd behavior concerning some libraries in my ear. If I put something in jboss-app file like above example, when I start my jboss server I have this exception :
java.lang.NoClassDefFoundError: org/jboss/netty/channel/socket/ClientSocketChannelFactory (a netty class)
(a netty class deployed in my ear)
Why does classloader can't see my library ? I tried to isolate only org.hibernate package. Of course, if I delete the jboss-app file I have no problem with netty library but still have my hibernate problem.
I think I don't understand something with JBoss isolation so if someone can help me on this problem, it would be good.