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 <[EMAIL PROTECTED]> 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