I have a JAR that contains some entity beans and session facades.
After start jboss in all mode, the application call the session facades that call entity beans and finalize. OK!
My application use ServiceLocator for find objects in JNDI Context.
The problem is that after do redeploy (hot-deploy), the ServiceLocator instance not is null. The JbossApp keep the instance of the ServiceLocator in server memory. All references of the EJB LocalHome still they are in the Map(cache).
I need clean whole context of my JAR´s. I need clean all static variables.
In Jboss.xml add code:
<loader-repository> br.com.xxxx:loader=MyEntity.jar </loader-repository>