Package com.atomikos.icatch

Examples of com.atomikos.icatch.CompositeTransactionManager


    //dummy return to make compiler happy
    return null;
  }
 
  private synchronized Session recycleSession() {
    CompositeTransactionManager tm = Configuration.getCompositeTransactionManager();
    if (tm == null)
      return null;
   
    CompositeTransaction current = tm.getCompositeTransaction();
    if ( ( current != null ) && ( current.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME) != null )) {
      synchronized (sessions) {
        for (int i=0; i<sessions.size() ;i++) {
          Session session = (Session) sessions.get(i);
          DynamicProxy dproxy = ( DynamicProxy ) session;
View Full Code Here


        this.previous = previous;
    }
   
    private void resume()
    {
        CompositeTransactionManager ctm =
            Configuration.getCompositeTransactionManager();
        if ( ctm == null ) {
            Configuration.logWarning ( "ResumePreviousTransactionSubTxAwareParticipant: no transaction manager found?" );
        }
        else {
            try {
                ctm.resume ( previous );
            }
            catch ( Exception error ) {
                Configuration.logWarning ( "ResumePreviousTransactionSubTxAwareParticipant: could not resume previous transaction" , error );
            }
        }
View Full Code Here

        this.previous = previous;
    }
   
    private void resume()
    {
        CompositeTransactionManager ctm =
            Configuration.getCompositeTransactionManager();
        if ( ctm == null ) {
            LOGGER.logWarning ( "ResumePreviousTransactionSubTxAwareParticipant: no transaction manager found?" );
        } else {
            try {
                ctm.resume ( previous );
            }
            catch ( Exception error ) {
                LOGGER.logWarning ( "ResumePreviousTransactionSubTxAwareParticipant: could not resume previous transaction" , error );
            }
        }
View Full Code Here

  {
      if ( restx_ != null )
          throw new JMSException (
                  "JtaMessageConsumer.enlist: already enlisted" );
 
      CompositeTransactionManager ctm = Configuration
              .getCompositeTransactionManager ();
 
      if ( ctm == null )
          throw new JMSException (
                  "JtaMessageConsumer: requires Atomikos TransactionsEssentials to be running! Please make sure to start a transaction first." );
 
      CompositeTransaction ct = ctm.getCompositeTransaction ();
      if ( ct == null || ct.getProperty TransactionManagerImp.JTA_PROPERTY_NAME ) == null )
          throw new JMSException (
                  "JTA transaction required for JtaMessageConsumer" );
 
      restx_ = (XAResourceTransaction) res_.getResourceTransaction ( ct );
View Full Code Here

          m = "JtaMessageProducer.enlist: Illegal multi-threaded use: object already enlisted by different thread [" + nameOfLastThreadToEnlist_ + "]";
          throw new JMSException ( m );
      }
 
     
      CompositeTransactionManager ctm = Configuration
              .getCompositeTransactionManager ();
 
      if ( ctm == null )
          throw new JMSException (
                  "JTA MessageProducer: requires Atomikos TransactionsEssentials to be running! Please make sure to start a transaction first." );
 
      CompositeTransaction ct = ctm.getCompositeTransaction ();
      if ( ct == null || ct.getProperty TransactionManagerImp.JTA_PROPERTY_NAME ) == null )
          throw new JMSException (
                  "JTA transaction required for JtaMessageProducer" );
 
      restx_ = (XAResourceTransaction) res_.getResourceTransaction ( ct );
View Full Code Here

      this.transaction = tx;
    }
   
    private void updateInTransaction () throws SQLException
    {
        CompositeTransactionManager ctm = Configuration
                .getCompositeTransactionManager ();
        if ( ctm == null )
            return;

        CompositeTransaction ct = ctm.getCompositeTransaction ();
        if ( ct != null && ct.getProperty TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {

            // if we are already in another (parent) tx then reject this,
            // because nested tx rollback can not be supported!!!
            if ( isInTransaction () && !isInTransaction ( ct ) )
View Full Code Here

            Object ret = Boolean.FALSE;
            if ( Configuration.isDebugLoggingEnabled() ) Configuration.logDebug ( this + ": getAutoCommit() returning false." );
            return ret;
          }
         
          CompositeTransactionManager ctm = Configuration.getCompositeTransactionManager ();
          CompositeTransaction ct = ctm.getCompositeTransaction();
         
            // if we are already in another (parent) tx then reject this,
            // because nested tx rollback can not be supported!!!
            if ( ct != null && !isInTransaction ( ct ) )
                AtomikosSQLException.throwAtomikosSQLException (
View Full Code Here

  public boolean canBeRecycledForCallingThread()
  {
    boolean ret = false;
    Reapable handle = getCurrentConnectionProxy();
    if ( handle != null ) {
       CompositeTransactionManager ctm = Configuration
             .getCompositeTransactionManager ();
       CompositeTransaction ct = null;
       if ( ctm != null ) ct = ctm.getCompositeTransaction ();
       if ( ct != null && ct.getProperty TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
         DynamicProxy dproxy = ( DynamicProxy ) handle;
         AtomikosThreadLocalConnection previous = (AtomikosThreadLocalConnection) dproxy.getInvocationHandler();
         ret = previous.isInTransaction ( ct );
       }
View Full Code Here

 
  public boolean canBeRecycledForCallingThread ()
  {
    boolean ret = false;
   
    CompositeTransactionManager tm = Configuration.getCompositeTransactionManager();
   
    CompositeTransaction current = tm.getCompositeTransaction();
    if ( ( current != null ) && ( current.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME) != null )) {
      ret = sessionHandleState.isInactiveInTransaction(current);
    }
   
    return ret;
View Full Code Here

    sessionHandleState.notifySessionErrorOccurred();
    reaped = true;
  }

  private CompositeTransactionManager getCompositeTransactionManager() {
    CompositeTransactionManager ret = Configuration.getCompositeTransactionManager();
    if ( ret == null ) Configuration.logWarning ( this + ": WARNING: transaction manager not running?" );
    return ret;
  }
View Full Code Here

TOP

Related Classes of com.atomikos.icatch.CompositeTransactionManager

Copyright © 2018 www.massapicom. 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.