Thanks for the reply.
Injection is not an option in our application. One of the goals is to be
multi-tenant. One appserver servicing 1-n datasources. So I can't hardcode
a resource name in the application. The requests includes an indicator
which maps to the datasource name which we lookup using JNDI.
David Blevins wrote:
>
> A note that in the 3.1.1 release lookups to "openejb:Resource/jdbc/
> awddb" will work inside a bean and outside a bean and regardless of
> how the InitialContext was created.
>
It sounds like 3.1.1 will resolve my issue. A couple questions:
Any idea when 3.1.1 will be released?
In 3.1.1 will I be able to do something like the following to bind to a name
of my choice?
InitialContext context = new InitialContext();
context.bind("jdbc/awddb", new
javax.naming.LinkRef("java:openejb/Resource/jdbc/awddb") );
Thanks again,
Brian
--
View this message in context:
http://www.nabble.com/DataSource-lookup-by-JNDI-name-tp23101598p23155547.html
Sent from the OpenEJB User mailing list archive at Nabble.com.