[jboss-user] [EJB 3.0] - JBOSS 4.2.1 + EJB3.0 : Native executes don't rollback!
guix
do-not-reply at jboss.com
Thu Jan 3 04:41:27 EST 2008
Hi:
I am using jboss 4.2.1 with ejb3 default configuration
If I make a native query execute update in a Session bean:
User user = new User(userId);
| myEntityManager.persist(user);
|
| String insertUserInOldTable = "insert into olduserstable values('" + userId + "');
| myEntityManager.createNativeQuery(insertUserInOldTable ).executeUpdate();
|
| String userCreate = "CREATE USER " + userId + " IDENTIFIED BY " + userPassword + " DEFAULT TABLESPACE TB1 TEMPORARY TABLESPACE TEMPORARY PROFILE P1";
| myEntityManager.createNativeQuery(userCreate).executeUpdate();
If the "create user " statement fails, the Entity bean code rolls back correctly but the insert statement does not roll back.
Why?
We need this to maintain old tables (no ejbs) in sync with new tables (ejb3)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116645#4116645
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116645
More information about the jboss-user
mailing list