[jboss-user] [JNDI/Naming/Network] - Re: Problem with resource-mapping

waynebaylor do-not-reply at jboss.com
Fri Nov 23 15:35:29 EST 2007


i would make each bean that needs a datasourse use a local jndi lookup instead of a global one. since you only have one jar you will only need one ejb-jar.xml and one jboss.xml. 

doing it this way you can keep your bean code the same, for example all lookups could be:DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/MyDS");
then in the jboss.xml you can map the lookup to the proper data source on a per bean basis.

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

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



More information about the jboss-user mailing list