hi.
in your c3p0.properties file, the parameter should be:
c3p0.autoCommitOnClose=true
note that setting this to true is different from the calling setAutoCommit( true ) on a Connection object. In a well written-application, autoCommitOnClose should be unimportant, because transactional clients should explicitly call commit() or rollback() prior to closing their Connections.
What c3p0's autoCommitOnClose parameters means is this: if a Connection is closed with transactional work that has been neither commited or rolledback, what should happen to that work? By default, c3p0 rolls back uncommitted work on close. If you set c3p0's autoCommitOnClose to true, that unresolved transactional work will be silently committed.
smiles,
steve (c3p0 maintainer)
|