OK, I have 2 solutions to my problem. 1. Upgrade to JBoss 4.0.3. Using that version, your servlet code can lookup a datasource on java:comp/env and JBoss will give the corresponding datastore that you have bound to java:/. For example, if the code is using java:comp/env, and your web.xml's resource-ref element has testDS as its name, your jboss-web.xml's resource-ref can map the testDS to whatever jndi name you choose under the java: namespace (say java:/realDS). Just make sure that your datasource's *-ds.xml file's jndi-name element is the same as it is in jboss-web.xml minus the java:. So in this case, it would be /realDS.
2. Change the servlet code to lookup java:/ + the datasource name. So if your web.xml's resource-ref element's name is testDS, your code needs to lookup the string "java:/testDS". You should then make sure your JBoss setup binds the datasource under the root of the java: namespace. In other words, your jboss-web.xml file has a resource-ref element that maps the testDS from your web.xml file to the jndi name java: + whatever the jndi-name element in your *-ds.xml file is. For example, if the *-ds.xml file has a jndi-name element with the value of /realDS, your jboss-web.xml file should have a resource-ref element that maps your web.xml's resource-ref's name to the jndi name of java:/realDS. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3905307#3905307 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3905307 ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user