I have this situation:
- a JBOSS instance
- application client.war
- application server.war
- a jboss module, properly installed, containing only the interfaces.
The server.war application implements the jboss module interfaces, and publishes these implementations with a JNDI bind. The client.war application with a lookup uses implementations server.war.
A runtime client.war can call the implementation exposed by server.war, but as soon as I try to start a transaction hibernate I get the following error:
ERROR [stderr] java.lang.IllegalStateException: JBAS016071: Singleton not set for ModuleClassLoader for Module "client.war:main" from Service Module Loader. This means that you are trying to access a weld deployment with a Thread Context ClassLoader that is not associated with the deployment.
There I bumped my head for days, but I can not understand what the problem is. Someone can help me?