1 Reply Latest reply on Jun 10, 2016 5:51 AM by nickarls

    Datasource gives closed connection on usage




      I have a persistence/transaction/dbunit test and I'm trying to verify some database data so I have @Resource injected a DataSource from JNDI. The injection is successful and I can get a connection from it (debugger says closed=false) but when I try to do a simple connection.createStatement on it, I get an SQL exception with "connection closed". Is there anything special that needs to be done in the test? I've also tried @Inject with a producer that has the resource injected into a stateless EJB but same thing. Pointers?


      Thanks in advance,