On May 3, 2008, at 10:59 AM, JimOR wrote:


I'm new to OpenEJB, so pardon my ignorance...

I am able to inject a DataSource into an EJB3.0 bean using
@Resource(name=[id defined in TOMCAT_HOME/conf/openejb.xml]).

I would prefer to deploy my driver and openejb configuration per webapp, so I tried deploying with a META-INF/openejb.xml containing only my resource
declaration.  During startup, I see the line

INFO  - Auto-linking resource-ref 'FooDataSourceID' in bean FooBean to
Resource(id=My DataSource)

I'm using:
Apache OpenEJB 3.0    build: 20080408-04:13 and apache-tomcat-6-0-16

I'm hoping I've missed something simple.

We've kicked around the idea of supporting having an openejb.xml in your app. More specifically allowing the Container and Resource elements to be used in an openejb-jar.xml.

I can probably get that working for you the week after I get back from JavaOne.

-David

Reply via email to