Datasources are not accessible outside the JBoss app server process.
I had the same problems because I used simple object and manage persistance via DAO over JDBC. I'd like to use the Datasource pool in order to use the same Connection as JBoss
As datasources are not accessible outside Jboss, I can develop an EJB whose role is to distribute Connection to my objects.
Is that a good way ?