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 Sun, 27 Jan 2008 16:15:29 GMT
David, it works great! Thanks a lot. And personally, I like the format
you have right now, because I can extract a lot of information from
the jndi path.

--Viet

On Jan 26, 2008 5:19 PM, David Jencks <david_jencks@yahoo.com> wrote:
> Just committed... you can see where stuff gets bound by looking at
> the log or in the console jndi viewer.
>
> basically they get bound based on their abstract name using a format
> pattern like:
>
> jca:{groupId}/{artifactId}/{j2eeType}/{name}
>
> so you might get
>
> jca:org.apache.geronimo.configs/system-database/
> JCAManagedConnectionFactory/SystemDatasource
>
> or
>
> jca:org.apache.geronimo.configs/activemq-ra/JCAAdminObject/
> SendReceiveQueue
>
> Suggestions for a different format would be appreciated.  Also
> comparisons with what David Blevins has in openejb would be great :-)
>
> You can set the format, the nameInNamespace, which gbeans are picked
> up, and a regexp for filtering the name component of the abstract
> name in config-substitutions.properties.
>
> thanks
> david jencks
>
>
> On Jan 26, 2008, at 9:08 AM, Viet Nguyen wrote:
>
> > 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.ConnectionFactoryBin
> >>> di
> >>> 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