As Peter said, its better to try it against 4.2.x first.
Also,
| if (somethingGoesWrong()) {
| sessionContext.setRollbackOnly();
|
| //Then get connection to the DB
| javax.sql.DataSource dataSource = ....;
| java.sql.Connection con = dataSource.getConnection();
|
| //and execute a query
| ...
| }
How about re-ordering the statements? The sessionContext.setRollbackOnly() is going to
mark the transaction for rollback. So why not get the datasource connection and run the
query first (probably through a @RequiresNew transaction method) and then setRollbackOnly
on the sessionContext.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168282#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...