I have two webapps deployd on a jboss 4.0.1 server using jdk 1.4.2 on Windows XP with Hibernate 3.0.5. Each app defines and initializes its own hibernate SessionFactory via a servlet. Each app exposes services via Axis. Both apps include all necessary jar files under WEB-INF/lib
I want to access a service in app-1 from app-2 without going through the web tier, and instead access the implementing class directly. I have packed the needed classes to a jarfile which I include in app-2.
The problem is that when app-1 call the method on app-2, the service is unable to find the SessionFactory; no exception is thrown. Instead I receive a WARN: Not Found: 8594978590497956950640000
I have tried debugging into SessionFactoryObjectFactory and found that the id above is the uid for which the SessionFactory i registerd in JNDI.
I tried upgrading to JBoss 4.0.3SP1 and Hibernate 3.1 and now it finds the SessionFactory but I get a ClassCastException on the returnd Object from a session.get(....)
I am sure the two apps use the same class versions.
I really don't want to upgrade the appserver nor Hibernate if I don't have to.
Btw: This works find on a Websphere 5.1 app server......