Package org.jboss.jca.core.connectionmanager.pool.mcp

Examples of org.jboss.jca.core.connectionmanager.pool.mcp.ManagedConnectionPool


            if (!isInterleaving())
            {
               cl.setTrackByTx(true);

               ManagedConnectionPool mcp = (ManagedConnectionPool)cl.getContext();
               Transaction tx = transactionManager.getTransaction();

               // The lock may need to be initialized if we are in the first lazy enlistment
               Lock lock = getLock();
               try
View Full Code Here


   protected ManagedConnectionPool getManagedConnectionPool(Object key, Subject subject, ConnectionRequestInfo cri)
      throws ResourceException
   {
      try
      {
         ManagedConnectionPool mcp = mcpPools.get(key);
         if (mcp == null)
         {
            ManagedConnectionPoolFactory mcpf = new ManagedConnectionPoolFactory();
            ManagedConnectionPool newMcp = mcpf.create(mcf, clf, subject, cri, poolConfiguration, this);

            mcp = mcpPools.putIfAbsent(key, newMcp);
            if (mcp == null)
            {
               mcp = newMcp;
View Full Code Here

         {
            Iterator<ManagedConnectionPool> it = mcpPools.values().iterator();

            while (it.hasNext())
            {
               ManagedConnectionPool other = it.next();
               if (other == pool && pool.isEmpty())
               {
                  pool.shutdown();
                  it.remove();
                  break;
View Full Code Here

      Set<ManagedConnectionPool> clearMcpPools = new HashSet<ManagedConnectionPool>();

      Iterator<ManagedConnectionPool> it = mcpPools.values().iterator();
      while (it.hasNext())
      {
         ManagedConnectionPool mcp = it.next();
         mcp.flush(kill);

         if (mcp.isEmpty())
            clearMcpPools.add(mcp);
      }

      if (clearMcpPools.size() > 0)
      {
         for (ManagedConnectionPool mcp : clearMcpPools)
         {
            mcp.shutdown();
            mcpPools.values().remove(mcp);
         }
      }
   }
View Full Code Here

      // Get specific managed connection pool key
      Object key = getKey(subject, cri, separateNoTx);

      // Get managed connection pool
      ManagedConnectionPool mcp = getManagedConnectionPool(key, subject, cri);

      // Are we doing track by transaction ?
      TransactionSynchronizationRegistry tsr = getTransactionSynchronizationRegistry();
      Object transactionKey = tsr != null ? tsr.getTransactionKey() : null;
View Full Code Here

    */
   public void returnConnection(ConnectionListener cl, boolean kill) throws ResourceException
   {
      cl.setTrackByTx(false);
      //Get connection listener pool
      ManagedConnectionPool mcp = (ManagedConnectionPool) cl.getContext();

      //Return connection to the pool
      mcp.returnConnection(cl, kill);

      if (trace)
         log.tracef("Returning connection to pool %s", cl);
   }
View Full Code Here

      log.debug(poolName + ": shutdown");

      Iterator<ManagedConnectionPool> it = mcpPools.values().iterator();
      while (it.hasNext())
      {
         ManagedConnectionPool mcp = it.next();
         mcp.shutdown();
      }

      mcpPools.clear();
   }
View Full Code Here

         {
            separateNoTx = clf.isTransactional();
         }

         Object key = getKey(subject, cri, separateNoTx);
         ManagedConnectionPool mcp = getManagedConnectionPool(key, subject, cri);

         if (!mcp.isFull())
         {
            cl = mcp.getConnection(subject, cri);
            result = true;
         }
      }
      catch (Throwable ignored)
      {
View Full Code Here

   protected ManagedConnectionPool getManagedConnectionPool(Object key, Subject subject, ConnectionRequestInfo cri)
      throws ResourceException
   {
      try
      {
         ManagedConnectionPool mcp = mcpPools.get(key);
         if (mcp == null)
         {
            ManagedConnectionPoolFactory mcpf = new ManagedConnectionPoolFactory();
            ManagedConnectionPool newMcp = mcpf.create(mcf, clf, subject, cri, poolConfiguration, this);

            mcp = mcpPools.putIfAbsent(key, newMcp);
            if (mcp == null)
            {
               mcp = newMcp;
View Full Code Here

         {
            Iterator<ManagedConnectionPool> it = mcpPools.values().iterator();

            while (it.hasNext())
            {
               ManagedConnectionPool other = it.next();
               if (other == pool && pool.isEmpty())
               {
                  pool.shutdown();
                  it.remove();
                  break;
View Full Code Here

TOP

Related Classes of org.jboss.jca.core.connectionmanager.pool.mcp.ManagedConnectionPool

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.