[jboss-user] [JNDI and Naming] - Re: JNDI lookup fails in load-on-startup servlet Jboss as7

Wolf-Dieter Fink do-not-reply at jboss.com
Sat Dec 10 07:17:47 EST 2011


Wolf-Dieter Fink [http://community.jboss.org/people/wdfink] created the discussion

"Re: JNDI lookup fails in load-on-startup servlet Jboss as7"

To view the discussion, visit: http://community.jboss.org/message/640887#640887

--------------------------------------------------------------
You should use injection instead of a JNDI this will add the correct dependencies.
> @Resource (mappedName="java:jboss/datasources/Test")
> *private* DataSource ds;

See this thread  http://community.jboss.org/thread/175196 http://community.jboss.org/thread/175196
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/640887#640887]

Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111210/4734da48/attachment.html 


More information about the jboss-user mailing list