geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: Gbean Deployment with JNDI Reference
Date Wed, 02 Aug 2006 19:45:11 GMT
On 8/2/06, Sutton, Timothy <Timothy.Sutton@sensis.com> wrote:
> Aaron,
> Do you think you could send me that code, and I will see if this will
> work for what I need.

http://people.apache.org/~ammulder/GeronimoDataSource.java

> -----Original Message-----
> From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of Aaron
> Mulder
> Sent: Wednesday, August 02, 2006 1:35 PM
> To: user@geronimo.apache.org
> Subject: Re: Gbean Deployment with JNDI Reference
>
>
> On 8/2/06, Sutton, Timothy <Timothy.Sutton@sensis.com> wrote:
> > I have written the app as a Spring Application and the only way we
> > could think to deploy that is through a Gbean. The Spring application
> > needs to run as a daemon service, and it needs to access JDBC through
> > JNDI. Is there a better way to deploy a Spring App with these
> > requirements?
>
> We are defintiely looking at ways to support improved Spring
> integration.
>
> For now, a daemon service is not going to be able to access JNDI.  I
> could provide some code for you for a bean that implements DataSource
> and takes a property for the name of the Geronimo database pool to
> connect to, and when called, passes everything through to the Geronimo
> pool.  Then you could just include that bean in your Spring
> configuration, and it would appear to the Spring application as if the
> Geronimo DataSource was right there in Spring.  How does that sound? (I
> don't know what would need to be done to integrate it with a transaction
> manager, if that's a concern, but it would be a start.)
>
> Thanks,
>      Aaron
>
> > -----Original Message-----
> > From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of
> > Aaron Mulder
> > Sent: Wednesday, August 02, 2006 11:02 AM
> > To: user@geronimo.apache.org
> > Subject: Re: Gbean Deployment with JNDI Reference
> >
> >
> > On 8/2/06, Sutton, Timothy <Timothy.Sutton@sensis.com> wrote:
> > > I am trying to deploy a Gbean with a reference to a JDBC data source
>
> > > via JNDI, and the Gbean can not see the resource name in JNDI.
> > > Although if I do this in a JSP within the same war it works fine.
> > > Does
> >
> > > anyone have an idea on how to resolve this problem.
> >
> > I don't think GBeans have access to the JNDI space (only J2EE
> > components have JNDI).  It might possibly work if a web app component
> > calls the GBean, but I'm pretty sure it wouldn't if the GBean was
> > called directly.
> >
> > Normally, a GBean has any necessary resources configured via
> > references and dependency injection, though it's a little tricky in
> > this case as the DataSource itself is not a GBean, only the
> > "ManagedConnectionFactoryWrapperGBean" that you get the DataSource
> > from.
> >
> > What are you trying to do?  And what component will be calling the
> > GBean?
> >
> > Thanks,
> >      Aaron
> >
>

Mime
View raw message