Package com.sleepycat.je

Examples of com.sleepycat.je.Transaction.commit()


            }
        };

        Transaction transaction = _environment.beginTransaction(null, null);
        new DatabaseTemplate(_environment, OLD_CONTENT_DB_NAME, transaction).run(cursorOperation);
        transaction.commit();
    }

    private void assertDatabaseRecordCounts()
    {
        assertDatabaseRecordCount(CONFIGURED_OBJECTS_DB_NAME, 12);
View Full Code Here


      Transaction txn = txnMap.remove(tx);
      if (txn != null) {
         if (trace) log.tracef("%s sleepycat transaction %s", commit ? "committing" : "aborting", txn);
         try {
            if (commit)
               txn.commit();
            else
               txn.abort();
         } catch (Exception caught) {
            throw convertToCacheLoaderException("Problem completing transaction", caught);
         }
View Full Code Here

            }
        };

        Transaction transaction = _environment.beginTransaction(null, null);
        new DatabaseTemplate(_environment, OLD_CONTENT_DB_NAME, transaction).run(cursorOperation);
        transaction.commit();
    }

    private void assertDatabaseRecordCounts()
    {
        assertDatabaseRecordCount(CONFIGURED_OBJECTS_DB_NAME, 21);
View Full Code Here

            throw new InvocationTargetException(e);
          }
          try {
            dataBinding.objectToEntry(cache, data);
            dbMain.put(tran, key, data);
            tran.commit();
          } catch (Exception e) {
            tran.abort();
            throw e;
          }
        }
View Full Code Here

            dataBinding.entryToObject(data).remove();
          }
        } finally {
          cursor.close();
        }
        tran.commit();
      } catch (Exception e) {
        tran.abort();
        throw e;
      }
    }
View Full Code Here

            dataBinding.entryToObject(data).remove();
          }
        } finally {
          cursor.close();
        }
        tran.commit();
      } catch (Exception e) {
        tran.abort();
        throw e;
      }
    }
View Full Code Here

            ret = cursor.getNextDup(pKey, pData, null);
          }
        } finally {
          cursor.close();
        }
        tran.commit();
      } catch (Exception e) {
        tran.abort();
        throw e;
      }
    }
View Full Code Here

            public Void call() throws Exception {
                final Transaction transaction = entityStore.getEnvironment().beginTransaction(null,
                        null);
                try {
                    createLayer(layerName, transaction);
                    transaction.commit();
                } catch (RuntimeException e) {
                    transaction.abort();
                }
                return null;
            }
View Full Code Here

                // add any missing tileset
                for (String layerName : layerNames) {
                    createLayer(layerName, transaction);
                }
                transaction.commit();
            } catch (RuntimeException e) {
                transaction.abort();
                throw e;
            }
            return null;
View Full Code Here

        public Void call() throws Exception {
            Transaction transaction = entityStore.getEnvironment().beginTransaction(null, null);
            try {
                call(transaction);
                transaction.commit();
            } catch (RuntimeException e) {
                transaction.abort();
                throw e;
            }
            return null;
View Full Code Here

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.