hibernate.connection.release_mode

19 September 2008

Hibernate JDBC/Connection’s property hibernate.connection.release_mode is used to specify when Hibernate should release JDBC connections.

A JDBC connection is held until the session is explicitly closed or disconnected by default. For a JTA datasource, one should use after_statement to aggressively release connections after every JDBC call. And for a non-JTA connection, it often makes sense to release the connection at the end of each transaction. after_transaction.auto will
choose after_statement for the JTA and CMT transaction strategies and afte_transaction for the JDBC transaction strategy.

auto (default) | on_close | after_transaction | after_statement

These setting only affects Sessions returned from SessionFactory.openSession. If you are getting session through SessionFactory.getCurrentSession, the CurrentSessionContext implementation configured for use controls the connection release mode for those Sessions.

Related Posts:

  • No related posts
del.icio.us:hibernate.connection.release_mode  digg:hibernate.connection.release_mode  spurl:hibernate.connection.release_mode  wists:hibernate.connection.release_mode  simpy:hibernate.connection.release_mode  newsvine:hibernate.connection.release_mode  blinklist:hibernate.connection.release_mode  furl:hibernate.connection.release_mode  reddit:hibernate.connection.release_mode  fark:hibernate.connection.release_mode  blogmarks:hibernate.connection.release_mode  Y!:hibernate.connection.release_mode  smarking:hibernate.connection.release_mode  magnolia:hibernate.connection.release_mode  segnalo:hibernate.connection.release_mode  gifttagging:hibernate.connection.release_mode

Top Of Page | Trackback

If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.

It will look like this: hibernate.connection.release_mode

Leave a Reply