Examples of beginTransaction()


Examples of oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.beginTransaction()

            // Note if a nested unit of work this will recursively start a
            // transaction early on the parent also.
            if (isLockQuery()) {
                if ((!unitOfWork.getCommitManager().isActive()) && (!unitOfWork.wasTransactionBegunPrematurely())) {
                    unitOfWork.beginTransaction();
                    unitOfWork.setWasTransactionBegunPrematurely(true);
                }
            }
            if (unitOfWork.isNestedUnitOfWork()) {
                UnitOfWorkImpl nestedUnitOfWork = (UnitOfWorkImpl)getSession();
View Full Code Here

Examples of org.adbcj.Connection.beginTransaction()

      }

      connection.beginTransaction();
      connection.rollback().get();

      connection.beginTransaction();
      connection.commit().get();

      connection.beginTransaction();
    } finally {
      connection.close(true);
View Full Code Here

Examples of org.apache.activemq.store.PersistenceAdapter.beginTransaction()

                        size += message.getSize();
                        message.decrementReferenceCount();
                        // Commit the batch if it's getting too big
                        if (size >= maxCheckpointMessageAddSize) {
                            persitanceAdapter.commitTransaction(context);
                            persitanceAdapter.beginTransaction(context);
                            size = 0;
                        }
                    }
                }
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.beginTransaction()

      Connection con = pb.serviceConnectionManager().getConnection();
      Integer previousIsolationLevel = DataSourceUtils.prepareConnectionForTransaction(con, definition);
      txObject.setPreviousIsolationLevel(previousIsolationLevel);

      pb.beginTransaction();

      // Register the OJB PersistenceBroker's JDBC Connection for the DataSource, if set.
      if (getDataSource() != null) {
        ConnectionHolder conHolder = new ConnectionHolder(con);
        if (definition.getTimeout() != TransactionDefinition.TIMEOUT_DEFAULT) {
View Full Code Here

Examples of org.apache.stonehenge.stocktrader.dal.OrderDAO.beginTransaction()

    OrderDAO orderDAO = factory.getOrderDAO();
    CustomOrderBean order = null;
    CustomHoldingBean holding = new CustomHoldingBean();
    try {

      orderDAO.beginTransaction();
      order = createOrder(orderType, userID, holdingID, symbol, quantity,
          holding);

      TradeOrderServiceClient asynClient = TradeOrderServiceClient.getInstance();
      asynClient.SubmitOrderTrasactedQueue(order);
View Full Code Here

Examples of org.b3log.latke.repository.Repository.beginTransaction()

            };
        }

        repository.setCacheEnabled(false);

        final Transaction transaction = repository.beginTransaction();
        try {
            final String dataContent = request.getParameter("data").trim();
            final JSONArray data = new JSONArray(dataContent);
            for (int i = 0; i < data.length(); i++) {
                final JSONObject record = data.getJSONObject(i);
View Full Code Here

Examples of org.b3log.solo.repository.ArchiveDateArticleRepository.beginTransaction()

        final JSONObject archiveDateArticle = new JSONObject();

        archiveDateArticle.put(ArchiveDate.ARCHIVE_DATE + "_" + Keys.OBJECT_ID, "archiveDateId");
        archiveDateArticle.put(Article.ARTICLE + "_" + Keys.OBJECT_ID, "articleId");

        final Transaction transaction = archiveDateArticleRepository.beginTransaction();
        archiveDateArticleRepository.add(archiveDateArticle);
        transaction.commit();

        final JSONObject found = archiveDateArticleRepository.getByArticleId("articleId");
        Assert.assertNotNull(found);
View Full Code Here

Examples of org.b3log.solo.repository.ArchiveDateRepository.beginTransaction()

        archiveDate.put(ArchiveDate.ARCHIVE_TIME, DateUtils.parseDate("2011/12", new String[] {"yyyy/MM"}).getTime());
        archiveDate.put(ArchiveDate.ARCHIVE_DATE_ARTICLE_COUNT, 1);
        archiveDate.put(ArchiveDate.ARCHIVE_DATE_PUBLISHED_ARTICLE_COUNT, 1);

        final Transaction transaction = archiveDateRepository.beginTransaction();
        archiveDateRepository.add(archiveDate);
        transaction.commit();

        final List<JSONObject> archiveDates = archiveDateRepository.getArchiveDates();
        Assert.assertNotNull(archiveDates);
View Full Code Here

Examples of org.b3log.solo.repository.ArticleRepository.beginTransaction()

        article.put(Article.ARTICLE_SIGN_ID, "1");
        article.put(Article.ARTICLE_COMMENTABLE, true);
        article.put(Article.ARTICLE_VIEW_PWD, "");
        article.put(Article.ARTICLE_EDITOR_TYPE, "");

        final Transaction transaction = articleRepository.beginTransaction();
        articleRepository.add(article);
        transaction.commit();

        final JSONArray results = articleRepository.getByAuthorEmail("test@gmail.com", 1, Integer.MAX_VALUE).getJSONArray(Keys.RESULTS);
View Full Code Here

Examples of org.b3log.solo.repository.CommentRepository.beginTransaction()

        comment.put(Comment.COMMENT_ORIGINAL_COMMENT_NAME, "");
        comment.put(Comment.COMMENT_SHARP_URL, "comment1 sharp url");
        comment.put(Comment.COMMENT_URL, "comment1 url");
        comment.put(Comment.COMMENT_THUMBNAIL_URL, "comment1 thumbnail url");

        final Transaction transaction = commentRepository.beginTransaction();
        commentRepository.add(comment);
        transaction.commit();

        final List<JSONObject> comments =
                commentRepository.getComments("comment1 on id", 1,
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.