I am attempting to migrate a JBoss 3.2 application that uses hibernate2 to Sun Application Server 9.1_01.
I would like to make as few changes as possible - before enjoying all the new spec levels and features.
[b]First Question:[/b] Is it even possible to deploy hibernate2 on Sun Application Server 9.1?
In JBoss we used the HibernateService MBean and the HAR Deployer to package all of the Hibernate configuration up in a .sar. I've tried to imitate that with no luck.
When I try to use a LifecycleListener to bind the SessionFactory into JNDI, I can see Hibernate log INFO level statements showing that is loads properly and configures all the mappings, but then it cannot bind the SessionFactory and it fails with a:
[SessionFactoryObjectFactory] Could not bind factory to JNDI javax.naming.NamingException: invocation exception at com.sun.enterprise.naming.NamingManagerImpl.getComponentId(NamingManagerImpl.java:1332)
Am I going about this the right way? If so, are there any special rules about binding into JNDI that I should be aware of?
It looks like the Hibernate call:
config.buildSessionFactory();
attempts to bind internally into the jndi name it finds in the hibernate.cfg.xml file.
Any help is much appreciated!
-Marc
[Message sent by forum member 'mcalello' (mcalello)]
http://forums.java.net/jive/thread.jspa?messageID=261082