I added an attribute to the jdbc connection parameter in the repository.xml to enable
"eager" release of connections in OJB. I added this to the connection descriptor as I
think it's logical to think of this functionality as being tied to where/how you
obtained the connection in the first place.
Before this patch, a connection was associated with a PersistenceBroker (connection
was acquired late, when needed by the PB), and released when the PB was returned to
the pool.
This was causing some problems in EJB-land, and also imo not the best way to treat a
connection you are retreiving from a pool.
So, if you are using OJB in an application server, add eager-release="true" to your
connection descriptor to have OJB return the connection to the pool as soon as it's
done using it. It's my belief that in a high transactio load environment this could
enable more scalability.
This new functionality is backwards compatible, and doesn't require any changes.
With this latest change, I believe OJB is pretty solid inside JBoss (where I test).
cheers,
Matthew
example connection descriptor with eager releasing enabled.
<jdbc-connection-descriptor
jdbc-level="2.0"
jndi-datasource-name="java:/DefaultDS"
username="sa"
password=""
eager-release="true"
/>