Examples of beginTransaction()


Examples of org.tmatesoft.sqljet.core.table.SqlJetDb.beginTransaction()

       
        // getting rows in table with indexed field value in certain scope.       
        System.out.println();
        System.out.println(">Employees with full name in scope [B, I]:");
        System.out.println();
        db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
        try {
            printRecords(table.scope(FULL_NAME_INDEX, new Object[] {"B"}, new Object[] {"I"}));
        } finally {
            db.commit();
        }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.table.SqlJetDb.beginTransaction()

        calendar.add(Calendar.YEAR, -30);

        System.out.println();
        System.out.println(">Deleting rows of employees older than 30 years old.");
        System.out.println();
        db.beginTransaction(SqlJetTransactionMode.WRITE);
        try {
            ISqlJetCursor deleteCursor = table.scope(DOB_INDEX,
                     new Object[] {Long.MIN_VALUE},
                     new Object[] {calendar.getTimeInMillis()});
            while (!deleteCursor.eof()) {
View Full Code Here

Examples of org.tmatesoft.sqljet.core.table.SqlJetDb.beginTransaction()

        }

        System.out.println();
        System.out.println(">After deletion in row id order:");
        System.out.println();
        db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
        try {
            printRecords(table.open());
        } finally {
            db.commit();
        }
View Full Code Here

Examples of org.tmatesoft.sqljet.core.table.SqlJetDb.beginTransaction()

            printRecords(table.open());
        } finally {
            db.commit();
        }

        db.beginTransaction(SqlJetTransactionMode.WRITE);
        ISqlJetCursor updateCursor = null;
        try {
            table.insert("Smith", "John", 0);
            calendar.setTime(new Date(System.currentTimeMillis()));
            updateCursor = table.open();
View Full Code Here

Examples of org.tmatesoft.sqljet.core.table.SqlJetDb.beginTransaction()

        }

        System.out.println();
        System.out.println(">After insertion of a new record and updating dates (by PK):");
        System.out.println();
        db.beginTransaction(SqlJetTransactionMode.READ_ONLY);
        try {
            printRecords(table.order(table.getPrimaryKeyIndexName()));
            System.out.println();
            System.out.println(">Same in order defined by " + FULL_NAME_INDEX + " :");
            System.out.println();
View Full Code Here

Examples of org.tmatesoft.sqljet.core.table.SqlJetDb.beginTransaction()

        }
      
        System.out.println();
        System.out.println(">Dropping tables and indices:");
        System.out.println();
        db.beginTransaction(SqlJetTransactionMode.WRITE);
        try {
            Set<String> tables = db.getSchema().getTableNames();
            for (String tableName : tables) {
                ISqlJetTableDef tableDef = db.getSchema().getTable(tableName);
                Set<ISqlJetIndexDef> tableIndices = db.getSchema().getIndexes(tableDef.getName());
View Full Code Here

Examples of org.wso2.carbon.billing.core.jdbc.DataAccessObject.beginTransaction()

                                                Customer customer) throws BillingException {
        DataAccessObject dataAccessObject = BillingManager.getInstance().getDataAccessObject();
        List<Subscription> subscriptions = null;
        boolean succeeded = false;
        try {
            dataAccessObject.beginTransaction();
            if (customer == null) {
                subscriptions = dataAccessObject.getFilteredActiveSubscriptions(filter);
            } else {
                subscriptions = dataAccessObject.getFilteredActiveSubscriptionsForCustomer(filter, customer);
            }
View Full Code Here

Examples of org.wso2.carbon.dataservices.core.engine.DataService.beginTransaction()

    if (!dataService.isInTransaction()) {
      /* an active transaction has already started by the transaction manager,
       * e.g. external JMS transaction */
      if (dataService.isEnableXA() && !dataService.getDSSTxManager().hasNoActiveTransaction()) {
        /* signal we are inside a transaction */
        dataService.beginTransaction();
        inTx = true;
      }
    }
    OMElement result = processSingleRequest();
    if (inTx) {
View Full Code Here

Examples of org.wso2.carbon.registry.core.Registry.beginTransaction()

        OMElement data = fac.createOMElement("configuration",null);

        Registry registry = Util.getConfigSystemRegistry(0);
        boolean success = false;
        try {
            registry.beginTransaction();

            String secretKeyPath = EMAIL_VERIFICATION_COLLECTION + "/" + secretKey;
            if (!registry.resourceExists(secretKeyPath)) {
                String msg = "Email verification failed.";
                log.error(msg);
View Full Code Here

Examples of org.wso2.carbon.registry.core.session.UserRegistry.beginTransaction()

            UserRegistry registry = DashboardPopulatorContext.getRegistry(tenantId);

            // Creating the default gadget collection resource
            Collection defaultGadgetCollection = registry.newCollection();
            try {
                registry.beginTransaction();
                registry.put(gadgetsPath, defaultGadgetCollection);

                transferDirectoryContentToRegistry(rootDirectory, registry, rootPath, tenantId);
                registry.commitTransaction();
            } catch (Exception e) {
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.