Examples of DynamicProxy


Examples of com.atomikos.util.DynamicProxy

    boolean ret = false;
    synchronized (sessions) {
      Iterator it = sessions.iterator();
      while ( it.hasNext() && !ret ) {
        Object handle = it.next();
        DynamicProxy dproxy = ( DynamicProxy ) handle;
        AbstractJmsSessionProxy  session = (AbstractJmsSessionProxy) dproxy.getInvocationHandler();
        if ( session.isInactiveTransaction ( ct ) ) ret = true;
      }
    }
    return ret;
  }
View Full Code Here

Examples of com.atomikos.util.DynamicProxy

    //a session has terminated -> remove it from the list of sessions to enable GC
    synchronized (sessions) {
      Iterator it = sessions.iterator();
      while ( it.hasNext() ) {
        Object handle = it.next();
        DynamicProxy dproxy = ( DynamicProxy ) handle;
        AbstractJmsSessionProxy  session = (AbstractJmsSessionProxy) dproxy.getInvocationHandler();
        if ( session.isAvailable() ) it.remove();
      }
    }
  }
View Full Code Here

Examples of com.atomikos.util.DynamicProxy

   
    //let pool take care of reusing an existing handle
    Connection proxy = super.getConnection ( hmsg );         

        // here we are certain that proxy is not null -> increase the use count
        DynamicProxy dproxy = ( DynamicProxy ) proxy;
        com.atomikos.jdbc.nonxa.AtomikosThreadLocalConnection previous = (AtomikosThreadLocalConnection) dproxy.getInvocationHandler();

        previous.incUseCount();
        previous.addHeuristicMessage ( hmsg );
        if ( Configuration.isDebugLoggingEnabled() ) Configuration.logDebug ( this + ": returning " + proxy );
    return proxy;
View Full Code Here

Examples of com.atomikos.util.DynamicProxy

    classLoaders.add ( obj.getClass().getClassLoader() );
    classLoaders.add ( AtomikosThreadLocalConnection.class.getClassLoader() );
   
    ret = ClassLoadingHelper.newProxyInstance ( classLoaders , interfaceClasses , new AtomikosThreadLocalConnection ( pooledConnection ) );
   
    DynamicProxy dproxy = (DynamicProxy) ret;
    AtomikosThreadLocalConnection c = (AtomikosThreadLocalConnection) dproxy.getInvocationHandler();
    c.resourceName = resourceName;
   
    return ret;
  }
View Full Code Here

Examples of com.atomikos.util.DynamicProxy

  {
    Reapable ret = null;
    if ( canBeRecycledForCallingThread() ) {
      if ( Configuration.isDebugLoggingEnabled() ) Configuration.logDebug ( this + ": reusing existing proxy for thread..." );
      ret = getCurrentConnectionProxy();
      DynamicProxy dproxy = ( DynamicProxy ) ret;
      AtomikosThreadLocalConnection previous = (AtomikosThreadLocalConnection) dproxy.getInvocationHandler();
      //DON't increment use count: see case 27793
      //previous.incUseCount();
    } else {
      if ( Configuration.isDebugLoggingEnabled() ) Configuration.logDebug ( this + ": creating connection proxy..." );
      JdbcConnectionProxyHelper.setIsolationLevel ( connection, getDefaultIsolationLevel() );
View Full Code Here

Examples of com.atomikos.util.DynamicProxy

  public boolean isAvailable() {
    boolean ret = true;

    Reapable handle = getCurrentConnectionProxy();
    if ( handle != null ) {
      DynamicProxy dproxy = ( DynamicProxy ) handle;
      AtomikosThreadLocalConnection previous = (AtomikosThreadLocalConnection) dproxy.getInvocationHandler();
      ret = previous.isNoLongerInUse();
    }
   
    return ret;
   
View Full Code Here

Examples of com.atomikos.util.DynamicProxy

  public boolean isInTransaction ( CompositeTransaction ct ) {
    boolean ret = false;
    Reapable handle = getCurrentConnectionProxy();
    if ( handle != null ) {
      DynamicProxy dproxy = ( DynamicProxy ) handle;
      AtomikosThreadLocalConnection previous = (AtomikosThreadLocalConnection) dproxy.getInvocationHandler();
      ret = previous.isInTransaction ( ct );
    }
    return ret;
  }
View Full Code Here

Examples of com.atomikos.util.DynamicProxy

       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 );
       }
    }
    return ret;
  }
View Full Code Here

Examples of com.atomikos.util.DynamicProxy

    classLoaders.add ( obj.getClass().getClassLoader() );
    classLoaders.add ( AtomikosThreadLocalConnection.class.getClassLoader() );

    ret = ClassLoadingHelper.newProxyInstance ( classLoaders , minimumSetOfInterfaceClasses , interfaceClasses , new AtomikosThreadLocalConnection ( pooledConnection ) );

    DynamicProxy dproxy = (DynamicProxy) ret;
    AtomikosThreadLocalConnection c = (AtomikosThreadLocalConnection) dproxy.getInvocationHandler();
    c.resourceName = resourceName;

    return ret;
  }
View Full Code Here

Examples of com.atomikos.util.DynamicProxy

  {
    Reapable ret = null;
    if ( canBeRecycledForCallingThread() ) {
      if ( LOGGER.isDebugEnabled() ) LOGGER.logDebug ( this + ": reusing existing proxy for thread..." );
      ret = getCurrentConnectionProxy();
      DynamicProxy dproxy = ( DynamicProxy ) ret;
      AtomikosThreadLocalConnection previous = (AtomikosThreadLocalConnection) dproxy.getInvocationHandler();
      //DON't increment use count: see case 27793
      //previous.incUseCount();
    } else {
      if ( LOGGER.isDebugEnabled() ) LOGGER.logDebug ( this + ": creating connection proxy..." );
      JdbcConnectionProxyHelper.setIsolationLevel ( connection, getDefaultIsolationLevel() );
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.