[jboss-user] [JBoss Seam] - @Resource datasource injection
nickarls
do-not-reply at jboss.com
Tue Oct 16 15:56:00 EDT 2007
Hi,
Is the @Resource annotation supposed to work for POJOs also in Seam or is it an EJB-only thingie?
I got the picture that if I have a datasource with <jndi-name>Foo</jndi-name>, I could just use
@Resource(mappedName="Foo")
| private DataSource ds;
and have it injected, however null is all I get. Or do I need some xml resource-refs also? Tried using name="Foo" an a combo of java:Foo, java:/Foo, java:/jdbc/Foo etc but still nulls.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095775#4095775
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095775
More information about the jboss-user
mailing list