I'm more of a weblogic expert than jboss so I cannot confirm or deny reports of JNDI lookup failures when trying to fetch a session factory from the JNDI tree on jboss (it works for us on weblogic). I never believe what I read, I always confirm online reports of failures with my own tests.
There are so many ways you can solve your problem. One option would be to create a stateless session bean facade with a static instance variable that holds the SessionFactory instance and a static initializer in the bean class to crete the SessionFactory. Once you deploy the EJB to your server with the proper remote interface, problem gone. SessionFactory does not implement Serializable, but Session does, so your remote interface would return Session instances, not SessionFactory.
Grant
|