On Apr 21, 2009, at 5:58 AM, brianm709 wrote:


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.

I see, the lookup definitely makes more sense.

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?

Hopefully not more than a month.

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") );

We have to leave the bind crippled per spec in order to pass the TCK, but we could certainly add a flag that would allow bind to work. Would that work for you?


-David



Reply via email to