1 Reply Latest reply on Apr 24, 2002 12:25 PM by Matías Hernán Salvador

    TRANSACTION STOPPED

    Matías Hernán Salvador Newbie

      I have this method defined in my Bean Class. My Bean is an Stateless Session with Bean Managed Transaction. When I call it from my client, it doesn't pass the line when I get the first Connection. And it does not make the changes (NO COMMIT)

      Any idea why is my Transaction stopped in this place? Is there anything wrong in the definition of my Session? Or in the definition of my informix-xa-service.xml?

      public void getUsers()
      {
      try
      {
      InitialContext initCtx = new InitialContext();
      UserTransaction ut = ejbContext.getUserTransaction();

      DataSource ds1 = (javax.sql.DataSource) initCtx.lookup("java:/Informix1XaDS");
      DataSource ds2 = (javax.sql.DataSource) initCtx.lookup("java:/Informix2XaDS");

      ut.begin();

      Connection con1 = ds1.getConnection("sisa", "sisa");
      Connection con2 = ds2.getConnection("sisa", "sisa");

      Statement st1 = con1.createStatement();
      Statement st2 = con2.createStatement();

      st1.executeUpdate("update j01usuario set descripcion='TEST EJB1' where usuario='PEPE'");
      st2.executeUpdate("update j01usuario set descripcion='TEST EJB2' where usuario='PEPE'");

      st1.close();
      st2.close();
      con1.close();
      con2.close();

      ut.commit();

      } catch (Exception e) {e.printStackTrace();}
      }

        • 1. Re: TRANSACTION STOPPED
          Matías Hernán Salvador Newbie

          If anyone wants to help me with this problem, i give you more information about my case:

          I'm using JBoss 3.0 RC1

          I'm using BMT, but when I configure my Session Bean with CMT, I have the same problem... when It gets the SECOND connection, it hangs... doesn't even rollback.

          I tested with simple connection, made queries and updates... all ok, but if there's a second connection, can't do it.

          Any ideas??