Package org.hibernate

Examples of org.hibernate.Transaction.begin()


    session.setFlushMode( FlushMode.MANUAL );
    session.setCacheMode( cacheMode );
    session.setDefaultReadOnly( true );
    try {
      Transaction transaction = Helper.getTransactionAndMarkForJoin( session );
      transaction.begin();
      indexAllQueue( session );
      transaction.commit();
    }
    catch (Throwable e) {
      errorHandler.handleException( log.massIndexerUnexpectedErrorMessage() , e );
View Full Code Here


  }

  public Transaction beginTransaction() throws HibernateException {
    errorIfClosed();
    Transaction result = getTransaction();
    result.begin();
    return result;
  }

  public boolean isEventSource() {
    return false;
View Full Code Here

  }

  public Transaction beginTransaction() throws HibernateException {
    errorIfClosed();
    Transaction result = getTransaction();
    result.begin();
    return result;
  }

  public EntityPersister getEntityPersister(final String entityName, final Object object) {
    errorIfClosed();
View Full Code Here

    session.setFlushMode( FlushMode.MANUAL );
    session.setCacheMode( cacheMode );
    session.setDefaultReadOnly( true );
    try {
      Transaction transaction = session.getTransaction();
      transaction.begin();
      loadAllFromQueue( session );
      transaction.commit();
    }
    catch (Exception exception) {
      errorHandler.handleException( log.massIndexerExceptionWhileTransformingIds(), exception );
View Full Code Here

    if ( upperSession == null ) {
      session = sessionFactory.openStatelessSession();
    }
    try {
      Transaction transaction = session.getTransaction();
      transaction.begin();
      loadAllIdentifiers( session );
      transaction.commit();
    }
    catch (InterruptedException e) {
      // just quit
View Full Code Here

      // todo : should seriously consider not allowing a txn to begin from a child session
      //      can always route the request to the root session...
      log.warn( "Transaction started on non-root session" );
    }
    Transaction result = getTransaction();
    result.begin();
    return result;
  }
 
  public void afterTransactionBegin(Transaction tx) {
    errorIfClosed();
View Full Code Here

      // todo : should seriously consider not allowing a txn to begin from a child session
      //      can always route the request to the root session...
      log.warn( "Transaction started on non-root session" );
    }
    Transaction result = getTransaction();
    result.begin();
    return result;
  }
 
  public void afterTransactionBegin(Transaction tx) {
    errorIfClosed();
View Full Code Here

  }

  public Transaction beginTransaction() throws HibernateException {
    errorIfClosed();
    Transaction result = getTransaction();
    result.begin();
    return result;
  }

  public boolean isEventSource() {
    return false;
View Full Code Here

  }

  public Transaction beginTransaction() throws HibernateException {
    errorIfClosed();
    Transaction result = getTransaction();
    result.begin();
    return result;
  }

  public EntityPersister getEntityPersister(final String entityName, final Object object) {
    errorIfClosed();
View Full Code Here

      // todo : should seriously consider not allowing a txn to begin from a child session
      //      can always route the request to the root session...
      log.warn( "Transaction started on non-root session" );
    }
    Transaction result = getTransaction();
    result.begin();
    return result;
  }
 
  public void afterTransactionBegin(Transaction tx) {
    errorIfClosed();
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.