This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Just finished writing a custom login module that I can deploy to my tomcat installation. I declared the datasource that the login module uses as a global resource in the server.xml and was trying to look it up in my login module when doing the Authentication / Authorisation stuff. The problem I had was that I couldn't find the datasource in the JNDI tree, I quickly realised this was because the login module was looking in the context for the web application and therefore I needed to create a link which I did it using a . So what I don't understand is why I needed to do this. Given that the login-module is actually part of the container rather than a specific web application why can it not see globally available resources. I just need a bit of clarification on this if anyone is willing to offer it up.