JBoss 2.4.3, Windows 2000 Pro
(1) EJB method A does getConnection()
(2) A executes SQL - statement is still open
(3) A calls method B
(4) B does getConnection()
(5) B executes SQL
(6) B does connB.close() and returns
(7) A does connA.close()
By turning on logging, I observe that with XADataSourceLoader only one connection is retrieved from the pool, while with the JDBCDataSourceLoader the pool gives out two connections. Is there anything spec-wise that prohibits reuse of the connection with the JDBCDataSourceLoader? Or is there insufficient plumbing in place to determine that the connection could be reused?
Only use JDBCds loader from, like, servlets. It doesn't know about transactions. It would be like using NoTxConnnectionManager in 3.0. Everything is autocommit.