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 01:29:47 GMT
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.ConnectionFactoryBindings">
                <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