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 am using the default DataSource provided along with the glassfish server (Derby). When I try to connect to it using servlets it works without any problem. But what am trying to do is use a common POJO from which I can get a Connection. So when I try to use the DataSource in a POJO it doesn't work.
I know that Servlets can refer to DataSource through resource ref and glassfish-resources.xml
Am using netbeans. Is there a way so that I can use a POJO for using DataSource. This question has come up time and again. But I couldn't find any solution. Its not that I want to use server DataSource, I want it to be declarative rather than programmatic.
I know this question has come up before but that thread is dead.