tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ManojS <>
Subject Re: OpenEJB - Datasource lookup problem
Date Fri, 16 May 2008 17:17:56 GMT


I could see your message today only, since I was out of this topic with some
other tasks.

I could not solve that datasource lookup problem the way I wished to solve.
I mean, in my source code there were many places where we used to lookup
datasouces simply by the following two lines of code,

Context ctx = new InitialContext();
Datasource ds = (DataSource) ctx.lookup ("java:comp/env/MySqlDS" );

All these places where throwing the "NameNotFoundException" when we migrate
into OpenEJB (embedded openEJB with Tomcat 6.0.16). I wanted to solve the
issue without touching those source codes. But finally we solved the problem
by the way David suggested. Using resource injection with annotation. For
that, those many places we had to change the source code.


BraamB wrote:
> Hallo,
> Were you able to fix this problem? I am using the embedded openEJB with
> Tomcat 6 and have the exact same problem. I keep getting
> NameNotFoundException. Could you please help?

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

View raw message