We developing web services with Axis2 framework (legacy system). With jdbc it working fine, but I need to use it with hibernate. I tried 2 approaches:
- (Outside aar) I put hibernate*.jars to EARContent/lib and hibernate.cfg.xml to WEB-ING/classes
- (inside aar) I put hibernate.cfg.xml to aar/META-INF/ and added to service.xml parameter
<parameter name="ServiceTCCL">composite</parameter>
In first case I couldn’t reach hibernate.cfg.xml
java.lang.RuntimeException: java.lang.RuntimeException: org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
in 2nd case I lost access to JNDII seem to lose the container wide (jboss) jndi context.
java.lang.RuntimeException: javax.naming.NameNotFoundException: UserTransaction not bound
Thanks