Examples of beginTransaction()


Examples of com.google.appengine.api.datastore.DatastoreService.beginTransaction()

           public static void transUpdate(String kind,Hashtable columns,long id,Key pk,jiqlConnection conn)throws Exception
  {


DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
Transaction trans = datastore.beginTransaction();
conn.setTransaction(trans);

          Key key = KeyFactory.createKey(pk,kind,id);
        Entity e = datastore.get(key);
     Enumeration en = columns.keys();
View Full Code Here

Examples of com.hazelcast.transaction.TransactionContext.beginTransaction()

        TransactionContext context = transactionManager.newClientTransactionContext(options, endpoint.getUuid());
        if (sXid != null) {
            Transaction transaction = TransactionAccessor.getTransaction(context);
            transactionManager.addManagedTransaction(sXid, transaction);
        }
        context.beginTransaction();
        endpoint.setTransactionContext(context);
        return context.getTxnId();
    }

    @Override
View Full Code Here

Examples of com.scooterframework.transaction.TransactionManager.beginTransaction()

  public void test_retrieveTableDataBySQL() {
    String countSql = "SELECT count(*) FROM pets";
   
        TransactionManager tm =  TransactionManagerUtil.getTransactionManager();
        try{
          tm.beginTransaction();
     
      Object countBeforeInsert = SqlServiceClient.retrieveObjectBySQL(countSql);
      assertEquals("Total rows countBeforeInsert", "13", countBeforeInsert.toString());
     
      Object nextID = getNextPetID();
View Full Code Here

Examples of com.sleepycat.collections.CurrentTransaction.beginTransaction()

    private void writeAndRead()
        throws Exception {

        CurrentTransaction txn = CurrentTransaction.getInstance(env);
        if (txn != null) {
            txn.beginTransaction(null);
        }

        MarshalledObject o1 = new MarshalledObject("data1", "pk1", "ik1", "");
        assertNull(storeMap1.put(null, o1));
View Full Code Here

Examples of com.sleepycat.db.Environment.beginTransaction()

        boolean autoCommit = false;
  Environment env = db.getEnvironment();
        if (transactional &&
      txn == null &&
      DbCompat.getThreadTransaction(env) == null) {
            txn = env.beginTransaction(null, null);
            autoCommit = true;
        }

        boolean failed = true;
        Cursor cursor = db.openCursor(txn, null);
View Full Code Here

Examples of com.sleepycat.je.Environment.beginTransaction()

        boolean autoCommit = false;
        Environment env = db.getEnvironment();
        if (transactional &&
            txn == null &&
            DbCompat.getThreadTransaction(env) == null) {
            txn = env.beginTransaction
                (null, secIndex.getAutoCommitTransactionConfig());
            autoCommit = true;
        }

        boolean failed = true;
View Full Code Here

Examples of com.sleepycat.je.XAEnvironment.beginTransaction()

            dbConfig.setSortedDuplicates(true);
            Database db = env.openDatabase(null, dbName, dbConfig);

            Transaction txn = null;
            if (transactional) {
                txn = env.beginTransaction(null, null);
            }

            /* Write: {0, 0}, {0, 1}, {1, 0}, {2, 0}, {3, 0} */
            for (int j = 0; j < N_ENTRIES; j += 1) {
                db.put(txn, Utils.entry(j), Utils.entry(0));
View Full Code Here

Examples of com.sleepycat.je.rep.ReplicatedEnvironment.beginTransaction()

            /*
             * If master, start a transaction as a way of ascertaining whether
             * all nodes are up. Since the ReplicaAckPolicy is ALL, the
             * transaction will only begin when all the nodes are available.
             */
            Transaction txn = repEnv.beginTransaction(null, null);
            txn.abort();

            /* Invoke the group shutdown API. */
            repEnv.shutdownGroup(timeout, TimeUnit.SECONDS);
        } else if (repEnv.getState().isReplica()) {
View Full Code Here

Examples of com.taobao.metamorphosis.client.producer.MessageProducer.beginTransaction()

        final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String line = null;
        while ((line = readLine(reader)) != null) {
            try {
                // ��ʼ����
                producer.beginTransaction();
                // �������ڷ���������Ϣ
                if (!producer.sendMessage(new Message(topic, line.getBytes())).isSuccess()) {
                    // ����ʧ�ܣ������ع�
                    producer.rollback();
                    continue;
View Full Code Here

Examples of com.webobjects.jdbcadaptor.JDBCContext.beginTransaction()

        adaptorChannel.openChannel();
      }
      try {
        JDBCContext jdbccontext = (JDBCContext) adaptorChannel.adaptorContext();
        try {
          jdbccontext.beginTransaction();
          Connection conn = jdbccontext.connection();
          Statement stmt = conn.createStatement();
          stmt.executeUpdate(sql);
          conn.commit();
        } catch (SQLException sqlexception) {
View Full Code Here
TOP
Copyright © 2015 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.