Just to make this thread complete.

I've solved the problem after lots of research. The problem was actually caused 
by that I specified the JDBC connection information in the Hibernate 
configuration file directly. In other words, Hibernate uses the JDBC directly 
without letting the JBoss App Server to manage it. Therefore, JBoss never know 
there is such a JDBC data source exists and can't do commit/rollback.

To solve it, I have to create a mydb-ds.xml file and place it under the 
meta-inf dir of my EAR. Then in the jboss-app.xml file, I refer to it as:

  | <jboss-app>
  |   <module>
  |         <service>meta-inf/mydb-ds.xml</service>
  |     </module>
  | </jboss-app>
  | 

Then configure the Hibernate to use JNDI to get the reference of the data 
source (plenty of doc on this). Also note that the 
${JBOSS_HOME}/doc/examples/jca contains lots of sample xxx-ds.xml file as 
template.

It seems that Hibernate document failed to mention this necessary configuration 
change when using JTA, and I see lots of posts with similary problem but no 
answers. It really should be added into the Hibernate doc.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955089#3955089

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955089

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to