Through the Hibernate MBean, how does one configure standard hibernate
properties aside from the hibernate mbean properties listed here:
http://docs.jboss.org/jbossas/jboss4guide/r3/html/ch13.html#ch13.config.table.
I've tried using a hibernate.properties file with no success.
The issue I'm trying to resolve is that the hibernate mbean in JBoss is closing
the JDBC connection after every sql statement. The logs indicate aggressive
release to be enabled and I am hoping that setting
hibernate.connection.release_mode to something other than after_statement will
resolve this issue. Key parts of the function in question is posted below:
| public void function() {
|
| Session s = HibernateUtil.currentSession();
|
| TableObject obj = (TableObject)s.get(TableObject.class, id);
| /* for the above line Hibernate opens a JDBC connection,
| obtains a resultSet, and then closes the JDBC connection */
|
| obj.setValue(10);
| obj.setValue2(20);
|
| s.update(obj);
| s.flush();
| /* for the above line Hibernate opens a JDBC connection,
| sends a update query, and then closes the JDBC connection */
|
| HibernateUtil.closeSession();
| }
|
|
where HibernateUtil contains a static SessionFactory object that is
instantiated through a JNDI lookup as well as a static ThreadLocal object that
stores a currently opened session.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3884436#3884436
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3884436
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user