there is something I would like to understand with Hibernate. I have these debg logs :
Quote
INFO: 21:04:36,448 DEBUG JDBCTransaction:54 - begin
INFO: 21:04:36,449 DEBUG BasicResourcePool:1644 - trace [email protected] [managed: 5, unused: 4, excluded: 0] (e.g. [email protected])
INFO: 21:04:36,450 DEBUG JDBCTransaction:59 - current autocommit status: true
INFO: 21:04:36,451 DEBUG JDBCTransaction:62 - disabling autocommit
...
SQL queries
...
INFO: 21:04:36,575 DEBUG JDBCTransaction:103 - commit
INFO: 21:04:36,576 DEBUG JDBCTransaction:193 - re-enabling autocommit
INFO: 21:04:36,577 DEBUG JDBCTransaction:116 - committed JDBC Connection
INFO: 21:04:36,449 DEBUG BasicResourcePool:1644 - trace [email protected] [managed: 5, unused: 4, excluded: 0] (e.g. [email protected])
INFO: 21:04:36,450 DEBUG JDBCTransaction:59 - current autocommit status: true
INFO: 21:04:36,451 DEBUG JDBCTransaction:62 - disabling autocommit
...
SQL queries
...
INFO: 21:04:36,575 DEBUG JDBCTransaction:103 - commit
INFO: 21:04:36,576 DEBUG JDBCTransaction:193 - re-enabling autocommit
INFO: 21:04:36,577 DEBUG JDBCTransaction:116 - committed JDBC Connection
I am trying to understand how sessions to the database works, I have started by posting a question here : http://stackoverflow...atement-pooling
and from what I can read create a network connection to a database server is expensive, so I decide to use a connection pooling with c3p0, you can see it in the logs :
Quote
INFO: 21:04:36,449 DEBUG BasicResourcePool:1644 - trace [email protected] [managed: 5, unused: 4, excluded: 0] (e.g. [email protected])
My question is : does this log INFO: 21:04:36,448 DEBUG JDBCTransaction:54 - begin means that a session is created? Or transaction and session are 2 different things and c3p0 is working correctly ?
This post has been edited by anirelles: 19 January 2009 - 02:47 PM