geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viet Nguyen" <vhng...@gmail.com>
Subject Re: how to get Datasource from a non j2ee module
Date Sat, 26 Jan 2008 17:08:09 GMT
Will the changes be made before 2.1 is released, because I need to
access the datasources in my migration to using JMX for the monitoring
plugin.

Thanks,
Viet

On Jan 26, 2008 2:13 AM, David Jencks <david_jencks@yahoo.com> wrote:
> I'm going to try to get an updated version of this class into 2.1.
> Tomasz was using it for a jms connection factory, thus the class he
> used: for a datasource indeed you would use javax.sql.DataSource.
> This class also won't work without modification in 2.1-SNAPSHOT since
> the ConnectionFactorySource interface has been replaced by
> ResourceSource.  It should work in 2.0.2 however.
>
> Hope this helps
> david jencks
>
>
> On Jan 25, 2008, at 5:29 PM, Viet Nguyen wrote:
>
> > Hi David,
> >
> > I tried the class given at
> > http://www.nabble.com/How-to-register-a-Datasource-in-GlobalJNDI-
> > Namespace--to12898127.html#a12902470,
> > but it does not seem to have bind the datasources into global jndi. I
> > checked using the admin console and I tried to access it with
> > something like ic.lookup("jdbc/ActiveDS"); and I get a
> > NotContextException.
> >
> > I think it might be because I am not configuring the gbean
> > incorrectly. The "type" is of type ConnectionFactory. I'm not sure if
> > this is a mistake or not...shouldn't it be of type
> > javax.sql.DataSource?
> >
> > <dep:gbean name="ConnectionFactoryBindings"
> > class="org.apache.geronimo.connector.globaljndi.ConnectionFactoryBindi
> > ngs">
> >                 <dep:attribute name="nameInNamespace">jms:conn</
> > dep:attribute>
> >                 <dep:attribute
> > name="type">javax.jms.ConnectionFactory</dep:attribute>
> >                 <dep:attribute
> > name="regularExpression">^JmsDispatcher.*ConnectionFactory$</
> > dep:attribute>
> > </dep:gbean>
> >
> > Thanks,
> > Viet
> >
> >
> > On Jan 25, 2008 2:02 AM, David Jencks <david_jencks@yahoo.com> wrote:
> >> Use the class mentioned here
> >>
> >>
> >> http://www.nabble.com/How-to-register-a-Datasource-in-GlobalJNDI-
> >> Namespace--tf4521379s134.html#a12902470
> >>
> >>
> >> to bind the datasources into global jndi and your classes can look
> >> them up there.
> >>
> >> thanks
> >> david jencks
> >>
> >>
> >> On Jan 24, 2008, at 10:30 PM, Viet Nguyen wrote:
> >>
> >>> Hi All,
> >>>
> >>> I have a plugin that pulls in a a JAR file (that is not a j2ee
> >>> module)
> >>> along with some datasources (packaged as a CAR). I want the
> >>> datasources to be visible to the classes of the JAR. Is there a
> >>> way to
> >>> configure this?
> >>>
> >>> --Viet
> >>
> >>
>
>

Mime
View raw message