Hibernate JDBC and Connection Properties.

Hibernate JDBC and Connection Properties:
  • hibernate.jdbc.fetch_size: It is a non-zero value determines the JDBC fetch size.
  • hibernate.jdbc.batch_size: It is a non-zero value enables use of JDBC batch updates by Hibernate. It is recommended to take value between 5 and 30.
  • hibernate.jdbc.use_scrollable_resultset: Enables use of JDBC scrollable resultsets by Hibernate. This property is only necessary when using user supplied JDBC connections, Hibernate uses connection metadata otherwise. Possible value are true or false.
  • hibernate.connection.provider_class: The class name of a custom org.hibernate.ConnectionProvider which provides JDBC connection to Hibernate.
  • hibernate.connection.isolation: This property is used to set the JDBC transaction isolation level. The possible values are 1,2,3,4.
  • hibernate.connection.autocommit: It is used to enables autocommit for JDBC pooled connections.
  • hibernate.connection.release_mode: Specify when Hibernate should release JDBC connections. By default, a JDBC connection is held until the session is explicitly closed or disconnected. For an application server JTA datasource, you shold use after__satatement to aggressively release connections after every JDBC call. For a non JTA connection, it often makes sense to release the connection at the end of each transaction, by using after_transaction .auto will chose after_statement of the JTA and CMT transaction strategies and after_transaction for the JDBC transaction strategy.


Post a Comment