tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rde8026 <>
Subject HELP! JNDI DataSource Name
Date Fri, 19 Sep 2008 22:10:29 GMT


I'm sorry to post to message; I've seen a bunch of messages like this posted
but everything I've read and tried doesn't seem to work and I have no idea

I'm trying to get a reference to a Container Managed DataSource (configured
in my openejb.xml file).  I can get the reference via the @Resource
annotation but I am unable to get the resource via standard JNDI.

here is my code

Object obj1 = new
I've also tried it like this:
Properties props = new Properties();
javax.naming.Context ctx = new javax.naming.InitialContext(props);
Object obj1 = ctx.lookup("java:openejb/Resource/JTADS");

I always get this error: NameNotFoundException: Name
"java:openejb/Resource/JTADS" not found.

Now the reason I need to understand the correct JNDI name is so I can use it
as a Hibernate Property (hibernate.connection.datasource).

I'm using openejb 3.1 SNAPSHOT and Hibernate

Any ideas?  I'm totally I understand it this should just work...
Thanks in advance....

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message