3 Replies Latest reply on Feb 18, 2006 11:51 AM by cagean

    UserTransaction

    javatwo

      Hello,
      I am using JBoss 4.0.3SP1. Which jar file has the javax.transaction.UserTransaction class? I could not find it from JBoss installation. Do I need to download it from sun.com? Thanks

        • 1. Re: UserTransaction

          Most API classes are in jboss-j2ee.jar

          • 2. Re: UserTransaction
            peterj

            It is located in both ./client/jbossall-client.jar and ./server/xxx/lib/jboss-j2ee.jar.

            By the way, check out jarFinder, a handy free tool from isocra, at http://www.isocra.com/articles/jarFinder.php. It has helped me countless times to determine which jar file contains a class or properties file.

            • 3. UserTransaction
              cagean

              el inconveniente que tenemos es que la transaccion no esta haciendo ni commit, ni rollback, ni presenta exceptions. los estados de la transaccion son 0 despues de que inicia y 6 despues de la instruccion commit y rollback. cuando vemos en las bases de datos no ingreso los datos aun cuando no se presenta ninguna exception.

              las bases de datos que utilizamos son postgreSQL, y el servidor es JBoss 4.0.2


              public void insertIntoVertical(VOInsert voi, String schemaId, Vector fragments, SiteFragment siteFragment, UserTransaction ut) throws Exception
              {
              PGXADataSource xads = null;
              Connection conPostgres = null;
              VOSite vos = null;
              Vector fields = null;
              Statement s = null;
              String insertString;

              try

              {

              ut.begin();
              for(int i = 0; i < fragments.size(); i++) /*es un Vector con VOFragment que contiene informacion acerca de un fragmento especifico*/
              {
              VOFragment vof= (VOFragment)fragments.get(i);
              vos = siteFragment.getSite(vof.getSite());
              xads = new PGXADataSource();
              xads.setDatabaseName(vos.getDbName());
              xads.setPortNumber(vos.getPort());
              xads.setServerName(vos.getUrl());
              xads.setPassword(vos.getPassword());
              xads.setUser(vos.getUserName());

              conPostgres = xads.getConnection();
              conPostgres.setAutoCommit(false);
              s = conPostgres.createStatement();

              fields = siteFragment.getFragmentFields(vos.getName(),vof.getName());
              insertString = createInsertString(fields,voi,vof.getName());
              //estos dos metodos crean las cadenas para la insercion en cada uno de los fragmentos.

              s.executeUpdate(insertString);
              }

              ut.commit();
              }
              catch(Exception e)
              {
              ut.rollback();
              e.printStackTrace();
              }
              }