[jboss-user] [JNDI/Naming/Network] - Re: JNDI lookup for Data source

dasunp do-not-reply at jboss.com
Mon Nov 20 06:25:15 EST 2006


appreciate your comments.. few more clarifications..

this utility class is in EJB project. As I read resource-refs can only be placed per each EJB (only specific to a particular EJB/s) There is no way a genral resource-ref can be defined in ejb-jar.xml. If so, this resource-ref will only be visible to only EJBs where resource-refs are defined. So how a utility class in a EJB project looks up such a resource-ref?

When looking up such resources, out of the following two way which is the best practise?

lookup gicing full path
ctx.lookup("java:comp/env/something/something");

or
lookup giving only relative path
ctx.lookup("something/something");	


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987259#3987259

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987259



More information about the jboss-user mailing list