Hello to all, I'm newbie with JTA and JBoss. Forgive me if my question is very stupid. This is my code:
public class Application { | | public static String URL = "java:comp/UserTransaction"; | | public Application() throws IllegalStateException, SecurityException, SystemException { | | UserTransaction user = null; | SchemaAdmin schema = new SchemaAdmin(); | | try | { | Context ic = new InitialContext(); | user = (UserTransaction) ic.lookup(URL); | | user.begin(); | | | schema.addSchemaReference( "172.25.0.3", "rogerio.schema" ); | schema.addSchemaReference( "172.25.0.20", "rogerio.schema | " ); | schema.addSchemaReference( "172.25.0.19", "rogerio.schema" ); | schema.addSchemaReference( "172.25.0.22", " | rogerio.schema" ); | | user.commit(); | | }catch ( NamingException nex ){ | nex.printStackTrace(); | } | catch ( Exception sex ){ | System.out.println ( "rollback" ); | user.rollback | (); | sex.printStackTrace(); | } | } | } This code execute as if it did not have the UserTransaction. It not work like a atomic transaction, when it execute rollback dont return to a stable state. What I have to do so this work like atomic transation? Thank you. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3907951#3907951 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3907951 ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user