This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I have been reading the JBoss docs and have found the reference to adding the resource-ref tag in my jboss-web.xml file to link my datasources etc.. with tomcat. My question is when I write my classes do I use lookups on the jndi-name specified in the jboss-web.xml or the web.xml file. I don't see how it makes it possible to write once and deploy anywhere if you have to re-code your servlets or DAO's to use the new JNDI