On Mar 7, 2006, at 11:14 PM, Manu George wrote:

Hi ,

I have a final object (SessionFactory of hibernate) that I need in the JNDI context of an application. Since Geronimo does not have a global JNDI Context I am planning to write a GBean to initialize the Session factory and then in the application provide the gbean-ref. Does this feature work as of now? If I have a $getResource() in my gbean and return the session factory will I get the session factory in the JNDI context of the application. Is this the correct approach? What i want is a sessionfactory bound to the JNDIContext of the application using Hibernate.


Assuming I understand what you are trying to do I think this will work. In your application you should declare a resource-ref with type (hibernate) SessionFactory. You might want to look at the mail gbean which does something similar.

thanks
david jencks

Regards
Manu





Reply via email to