Examples of beginEarlyTransaction()


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

                DatabaseValueHolder wrapped = (DatabaseValueHolder)getWrappedValueHolder();
                UnitOfWorkImpl unitOfWork = getUnitOfWork();
                if (!wrapped.isEasilyInstantiated()) {
                    if (wrapped.isPessimisticLockingValueHolder()) {
                        if (!unitOfWork.getCommitManager().isActive() && !unitOfWork.wasTransactionBegunPrematurely()) {
                            unitOfWork.beginEarlyTransaction();
                        }
                        unitOfWork.log(SessionLog.FINEST, SessionLog.TRANSACTION, "instantiate_pl_relationship");
                    }
                    if (unitOfWork.getCommitManager().isActive() || unitOfWork.wasTransactionBegunPrematurely()) {
                        // At this point the wrapped valueholder is not triggered,
View Full Code Here

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

        /* Fix to allow executing non-selecting SQL in a UnitOfWork. - RB */
        if (getSession().isUnitOfWork()) {
            UnitOfWorkImpl unitOfWork = (UnitOfWorkImpl)getSession();
            /* bug:4211104 for DataModifyQueries executed during an event, while transaction was started by the uow*/
            if ( !unitOfWork.getCommitManager().isActive() && !unitOfWork.isInTransaction()) {
                unitOfWork.beginEarlyTransaction();
            }
            unitOfWork.setWasNonObjectLevelModifyQueryExecuted(true);
        }
        return getQueryMechanism().executeNoSelect();
    }
View Full Code Here

Examples of oracle.toplink.essentials.sessions.UnitOfWork.beginEarlyTransaction()

    if (!definition.isReadOnly() && !this.lazyDatabaseTransaction) {
      // This is the magic bit. As with the existing Spring TopLink integration,
      // begin an early transaction to force TopLink to get a JDBC Connection
      // so that Spring can manage transactions with JDBC as well as TopLink.
      UnitOfWork uow = (UnitOfWork) getSession(entityManager);
      uow.beginEarlyTransaction();
    }
    // Could return the UOW, if there were any advantage in having it later.
    return null;
  }
View Full Code Here

Examples of oracle.toplink.essentials.sessions.UnitOfWork.beginEarlyTransaction()

    if (!definition.isReadOnly() && !this.lazyDatabaseTransaction) {
      // This is the magic bit. As with the existing Spring TopLink integration,
      // begin an early transaction to force TopLink to get a JDBC connection
      // so that Spring can manage transactions with JDBC as well as TopLink.
      UnitOfWork uow = (UnitOfWork) getSession(entityManager);
      uow.beginEarlyTransaction();
    }
    // Could return the UOW, if there were any advantage in having it later.
    return null;
  }
View Full Code Here

Examples of oracle.toplink.sessions.UnitOfWork.beginEarlyTransaction()

    final SessionFactory sf = new MockSessionFactory(session);

    session.getActiveUnitOfWork();
    sessionControl.setReturnValue(uow, 2);
    uow.beginEarlyTransaction();
    uowControl.setVoidCallable(1);
    uow.commit();
    uowControl.setVoidCallable();
    session.release();
    sessionControl.setVoidCallable(2);
View Full Code Here

Examples of oracle.toplink.sessions.UnitOfWork.beginEarlyTransaction()

    final SessionFactory sf = new MockSessionFactory(session);

    // during commit, TM must get the active UnitOfWork
    session.getActiveUnitOfWork();
    sessionControl.setReturnValue(uow, 2);
    uow.beginEarlyTransaction();
    uowControl.setVoidCallable(1);
    uow.commit();
    uowControl.setVoidCallable();
    // session should be released when it was bound explicitly by the TM
    session.release();
View Full Code Here

Examples of oracle.toplink.sessions.UnitOfWork.beginEarlyTransaction()

    final SessionFactory sf = new MockSessionFactory(session);

    session.getActiveUnitOfWork();
    sessionControl.setReturnValue(uow, 1);
    uow.beginEarlyTransaction();
    uowControl.setVoidCallable(1);
    session.release();
    sessionControl.setVoidCallable(1);

    sessionControl.replay();
View Full Code Here

Examples of oracle.toplink.sessions.UnitOfWork.beginEarlyTransaction()

    final SessionFactory sf = new MockSessionFactory(session);

    session.getActiveUnitOfWork();
    sessionControl.setReturnValue(uow, 2);
    uow.beginEarlyTransaction();
    uowControl.setVoidCallable(1);
    uow.commit();
    uowControl.setVoidCallable();
    session.release();
    sessionControl.setVoidCallable();
View Full Code Here

Examples of oracle.toplink.sessions.UnitOfWork.beginEarlyTransaction()

    final MockSessionFactory sf = new MockSessionFactory(session1);

    session2.getActiveUnitOfWork();
    session2Control.setReturnValue(uow2, 2);
    uow2.beginEarlyTransaction();
    uow2Control.setVoidCallable(1);
    uow2.commit();
    uow2Control.setVoidCallable();
    session2.release();
    session2Control.setVoidCallable();
View Full Code Here

Examples of org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.beginEarlyTransaction()

                DatabaseValueHolder wrapped = (DatabaseValueHolder)getWrappedValueHolder();
                UnitOfWorkImpl unitOfWork = getUnitOfWork();
                if (!wrapped.isEasilyInstantiated()) {
                    if (wrapped.isPessimisticLockingValueHolder()) {
                        if (!unitOfWork.getCommitManager().isActive() && !unitOfWork.wasTransactionBegunPrematurely()) {
                            unitOfWork.beginEarlyTransaction();
                        }
                        unitOfWork.log(SessionLog.FINEST, SessionLog.TRANSACTION, "instantiate_pl_relationship");
                    }
                    if (unitOfWork.getCommitManager().isActive() || unitOfWork.wasTransactionBegunPrematurely()) {
                        // At this point the wrapped valueholder is not triggered,
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.