Examples of commit()


Examples of javax.persistence.EntityTransaction.commit()

    else {
      EntityTransaction tx = entityManager.getTransaction();
      try {
        tx.begin();
        Object result = action.execute(method, parameters);
        tx.commit();
        return result;
      } catch (Exception e) {
        tx.rollback();
        throw e.getCause();
      }

Examples of javax.resource.cci.LocalTransaction.commit()

    interactionControl.setVoidCallable(1);

    connection.getLocalTransaction();
    connectionControl.setReturnValue(localTransaction);

    localTransaction.commit();
    localTransactionControl.setVoidCallable(1);

    connection.close();
    connectionControl.setVoidCallable(1);

Examples of javax.resource.spi.XATerminator.commit()

      if (work.delisted)
         throw new Exception("Should not be ended yet");
      if (work.committed)
         throw new Exception("Should not be committed yet");

      xt.commit(xid, true);
      if (work.delisted == false)
         throw new Exception("Should be ended");
      if (work.committed == false)
         throw new Exception("Should be committed");
   }

Examples of javax.security.auth.spi.LoginModule.commit()

        login.login();
      } catch (Exception e) {
        login.abort();
      }

      login.commit();

      Set<Principal> principals = subject.getPrincipals();

      return principals;
    } catch (LoginException e) {

Examples of javax.security.jacc.PolicyConfiguration.commit()

        try {
            // commit the policy configuration objects
            for (Iterator itCtxId = ctxIDs.iterator(); itCtxId.hasNext();) {
                ctxId = (String) itCtxId.next();
                PolicyConfiguration pc = getPolicyConfigurationFactory().getPolicyConfiguration(ctxId, false);
                pc.commit();
            }
        } catch (PolicyContextException pce) {
            throw new DeployerException("Cannot commit policy configuration with Id '" + ctxId + "'", pce);
        }

Examples of javax.sql.rowset.CachedRowSet.commit()

        isMetaDataEquals(crset.getMetaData(), another.getMetaData());

        assertEquals(crset.getRow(), another.getRow());

        try {
            another.commit();
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected
        }
    }

Examples of javax.sql.rowset.JdbcRowSet.commit()

        jrs.setAutoCommit(false);
        assertFalse(jrs.getAutoCommit());
        assertTrue(jrs.absolute(3));
        jrs.updateString(2, "update3");
        jrs.updateRow();
        jrs.commit();
        jrs.rollback();

        /*
         * TODO why throw NullPointerException after call rollback()?
         */
 

Examples of javax.transaction.Transaction.commit()

        assertEquals(Status.STATUS_NO_TRANSACTION, tm.getStatus());
        tm.begin();
        assertEquals(Status.STATUS_ACTIVE, tm.getStatus());
        Transaction tx = tm.getTransaction();
        assertNotNull(tx);
        tx.commit();
        assertNotNull(tm.getTransaction());
        assertEquals(Status.STATUS_NO_TRANSACTION, tm.getStatus());
    }

    public void testNoResourcesMarkRollbackOnly() throws Exception {

Examples of javax.transaction.TransactionManager.commit()

      assertEquals("value", cache1.get(fqn, "key"));

      txm.begin();
      cache2.put(fqn, "key", "value");
      assertEquals("value", cache2.get(fqn, "key"));
      txm.commit();

      // since the node already exists even PL will not remove it - but will invalidate it's data
      Node n = cache1.getNode(fqn);
      CacheLoaderInvalidationTest.assertHasBeenInvalidated(n, "Should have been invalidated");
      assertEquals("value", cache2.get(fqn, "key"));

Examples of javax.transaction.UserTransaction.commit()

               sqlStatement.close();
            }
         }
       }

       tx.commit();
     }
     catch (Throwable t)
     {
       if(tx!=null)
         try {
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.