See issue 7569
https://glassfish.dev.java.net/issues/show_bug.cgi?id=7569
I modified the testcase to integrate the "same connection" test during the transaction.
Effectively I got the "same connection" result so this is ok on that part.
I am still not ok with the monitoring part of your explanation.
Since the 2 getConnection() and 2 close() are made within the transaction, I expect to see through the monitoring page only one connection to be created (the physical one) and two connections to be acquired.
Is there a configuration like a "lazy-something" property that could be configured to avoid seeing two physical connections created ?
[Message sent by forum member 'vkoniecz' (vkoniecz)]
http://forums.java.net/jive/thread.jspa?messageID=341622