Package org.hibernate

Examples of org.hibernate.Transaction.begin()


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

  @Override
  public boolean isEventSource() {
View Full Code Here


    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) {
      log.error( "error during batch indexing: ", 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 boolean isEventSource() {
    return false;
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

    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

  public void doSave(final BasketsBatch t) throws DataNotStoredException {
    final Session session = this.hibernateTemplate.getSessionFactory()
        .openSession();
    final Transaction transaction = session.getTransaction();
    try {
      transaction.begin();
      session.saveOrUpdate(t);
      final List<Basket> baskets = t.getBaskets();
      for (final Basket basket : baskets) {
        basket.setBasketsBatch(t);
        session.saveOrUpdate(basket);
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.