Package com.atomikos.icatch

Examples of com.atomikos.icatch.CompositeTransactionManager


 


  protected CompositeTransactionManager getCompositeTransactionManager()
  {
    CompositeTransactionManager ret = null;
    ret = Configuration.getCompositeTransactionManager();
    return ret;
  }
View Full Code Here


 
 
  protected void enlist ( String hmsg ) throws JMSException
  {
    CompositeTransaction ct = null;
    CompositeTransactionManager ctm = getCompositeTransactionManager();
    boolean enlist = false;
    StringHeuristicMessage shmsg = new StringHeuristicMessage ( hmsg );
   
    if ( ctm != null ) {
      ct = ctm.getCompositeTransaction();
      if ( ct != null && ct.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
        enlist = true;
      }
    }
   
View Full Code Here

 
  public boolean canBeRecycledForCallingThread ()
  {
    boolean ret = false;
    if ( currentProxy != null ) {
      CompositeTransactionManager tm = Configuration.getCompositeTransactionManager();
     
      CompositeTransaction current = tm.getCompositeTransaction();
      if ( ( current != null ) && ( current.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME) != null )) {
        DynamicProxy dproxy = ( DynamicProxy ) currentProxy;
        AtomikosJmsConnectionProxy proxy = (AtomikosJmsConnectionProxy) dproxy.getInvocationHandler();
        //recycle only if inactive in this tx - i.e., if proxy was closed!
        ret = proxy.isInactiveInTransaction(current);
View Full Code Here

            session = (Session) AtomikosJmsXaSessionProxy.newInstance( wrapped , jmsTransactionalResource , owner , this );
            addSession ( session );
          }
        } else {
          CompositeTransaction ct = null;
          CompositeTransactionManager ctm = Configuration.getCompositeTransactionManager();
          if ( ctm != null ) ct = ctm.getCompositeTransaction();
          if ( ct != null && ct.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
            if ( LOGGER.isInfoEnabled() ) LOGGER.logInfo ( this + ": creating NON-XA session - the resulting JMS work will NOT be part of the JTA transaction!" );
          }
          Integer ackMode = ( Integer ) args[1];
          Session wrapped = null;
View Full Code Here

    //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

 
  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

  private boolean enlist() throws AtomikosSQLException {
    boolean ret = false;
    try {
      Configuration.logDebug( this + ": notifyBeforeUse " + sessionHandleState);
      CompositeTransaction ct = null;
      CompositeTransactionManager ctm = getCompositeTransactionManager();
      if ( ctm != null ) {
        ct = ctm.getCompositeTransaction();
        //first notify the session handle - see case 27857
        sessionHandleState.notifyBeforeUse ( ct , hmsg );
        if (ct != null && ct.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
          ret = true;
          Configuration.logDebug ( this + ": detected transaction " + ct );
View Full Code Here

    Configuration.logDebug ( this + ": closed." );
  }
 
  private boolean isEnlistedInGlobalTransaction()
  {
    CompositeTransactionManager compositeTransactionManager = getCompositeTransactionManager();
    if (compositeTransactionManager == null) {
      return false; // TM is not running, we can only be in local TX mode
    }
    CompositeTransaction ct = compositeTransactionManager.getCompositeTransaction();
    return sessionHandleState.isActiveInTransaction ( 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

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.