geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: getting the datasource ref in a gbean
Date Wed, 08 Mar 2006 07:26:15 GMT

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.

david jencks

> Regards
> Manu

View raw message