Package com.atomikos.icatch

Examples of com.atomikos.icatch.CompositeTransaction


            session = (Session) AtomikosJmsXaSessionProxy.newInstance( wrapped , jmsTransactionalResource , owner , this );
            addSession ( session );
          }
        } else {
          if ( LOGGER.isInfoEnabled() ) LOGGER.logInfo ( this + ": creating NON-XA session..." );
          CompositeTransaction ct = null;
          CompositeTransactionManager ctm = Configuration.getCompositeTransactionManager();
          if ( ctm != null ) ct = ctm.getCompositeTransaction();
          if ( ct != null && ct.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
            if ( transactedFlag.booleanValue() )
              LOGGER.logInfo ( this + ": localTransactionMode is enabled on the connection factory - rollback/commit will NOT be part of the global JTA transaction!" );
            else
              LOGGER.logInfo ( this + ": you are creating a JMS session in non-transacted mode - the resulting JMS work will NOT be part of the JTA transaction!" );
          }
View Full Code Here


  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;
          AbstractJmsSessionProxy proxy = (AbstractJmsSessionProxy) dproxy.getInvocationHandler();
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;
      }
    }
   
    if ( enlist ) {
View Full Code Here

  {
    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 if either inactive in this tx, OR if active (since a new session will be created anyway, and
        //concurrent sessions are allowed on the same underlying connection!
        ret = proxy.isInactiveInTransaction(current) || proxy.isInTransaction( current );
View Full Code Here

            session = (Session) AtomikosJmsXaSessionProxy.newInstance( wrapped , jmsTransactionalResource , owner , this );
            sessions.add ( session );
          }
        } else {
          Configuration.logInfo ( this + ": creating NON-XA session..." );
          CompositeTransaction ct = null;
          CompositeTransactionManager ctm = Configuration.getCompositeTransactionManager();
          if ( ctm != null ) ct = ctm.getCompositeTransaction();
          if ( ct != null && ct.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
            if ( transactedFlag.booleanValue() )
              Configuration.logWarning ( this + ": localTransactionMode is enabled on the connection factory - rollback/commit will NOT be part of the global JTA transaction!" );
            else
              Configuration.logWarning ( this + ": you are creating a JMS session in non-transacted mode - the resulting JMS work will NOT be part of the JTA transaction!" );
          }
View Full Code Here

  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;
          AbstractJmsSessionProxy proxy = (AbstractJmsSessionProxy) dproxy.getInvocationHandler();
View Full Code Here

      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 );
      restx_.setXAResource ( xares_ );
View Full Code Here

 
      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 );
      restx_.setXAResource ( xares_ );
View Full Code Here

            session = (Session) AtomikosJmsXaSessionProxy.newInstance( wrapped , jmsTransactionalResource , owner , this );
            addSession ( session );
          }
        } else {
          if ( LOGGER.isInfoEnabled() ) LOGGER.logInfo ( this + ": creating NON-XA session..." );
          CompositeTransaction ct = null;
          CompositeTransactionManager ctm = Configuration.getCompositeTransactionManager();
          if ( ctm != null ) ct = ctm.getCompositeTransaction();
          if ( ct != null && ct.getProperty ( TransactionManagerImp.JTA_PROPERTY_NAME ) != null ) {
            if ( transactedFlag.booleanValue() )
              LOGGER.logInfo ( this + ": localTransactionMode is enabled on the connection factory - rollback/commit will NOT be part of the global JTA transaction!" );
            else
              LOGGER.logInfo ( this + ": you are creating a JMS session in non-transacted mode - the resulting JMS work will NOT be part of the JTA transaction!" );
          }
View Full Code Here

  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;
          AbstractJmsSessionProxy proxy = (AbstractJmsSessionProxy) dproxy.getInvocationHandler();
View Full Code Here

TOP

Related Classes of com.atomikos.icatch.CompositeTransaction

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.