im using JBoss 6 and JNDI to recieve a datasource. I discovered that datasource object contain a wrapped connection object (org.jboss.resource.adapter.jdbc.WrappedConnection).
Could me someone explain the advantage or reason of using a wrapped jboss connection object? I like to understand what happen inside jboss.
As it is the responsibility of the application server how the connection is handled there is a need to wrap it.
i.e. you will get a connection via JNDI and you are supposed to close it after you're finished.
But the connection is not really closed, the wrapper catch the close and mark the connection that it can be returned to pool after finished the transaction.