0 Replies Latest reply on Mar 19, 2009 2:31 AM by Preetam Palwe

    JBOSS 5: UserTransaction and SavePoints --> Is this possible

    Preetam Palwe Newbie

      Hi all

      I have a MDB with transaction attribute set to "NOT_SUPPORTED".
      In my code I am getting Connection by looking up some DS like "java:XYZ-DS" and also getting UserTransaction by looking up "java:comp/UserTransaction".

      Using the connection i fire some queries out of which some fail. I have created SavePoints using connection.setSavepoint("somename")
      Now I want to rollback to the named savepoint. How can I do this as i m in managed environment of JBOSS5.

      I can do this in JDBC code by simply calling connection.rollback(savepoint)
      But when I do this in my code in Jboss I get an exception saying "rollback not allowed in managed environment"

      Now how can i use savepoints in Jboss5 managed environment?

      thanks for help