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.
I'm trying to use a 3rd party component/jar, which has a javadoc that says:
This class requires a javax.sql.DataSource instance to be made available under the JNDI name "java:comp/env/jdbc/com/foo/blahblah
Is there a way to do this outside of an app server such as Tomcat? I'm trying to use it in a component that is not necessarily web-based, i.e. it could be used standalone.
Suppose I do have to use Tomcat to provide the DataSource. I'm only slightly familiar with JNDI and namespaces. So if Tomcat creates the DataSource, can I lookup the DataSource from a standalone class that is running outside of Tomcat?