Package org.xmlBlaster.util.pool

Examples of org.xmlBlaster.util.pool.ResourceWrapper


                  if (this.eraseUnusedPoolTimeout > 200L) {
                     synchronized(this.timeoutMonitor) {
                        this.timeoutHandle = this.poolManager.getTransistionTimer().refreshTimeoutListener(this.timeoutHandle, this.eraseUnusedPoolTimeout);
                     }
                  }
                  ResourceWrapper rw = poolManager.reserve(PoolManager.USE_OBJECT_REF);
                  Connection con = (Connection)rw.getResource();
                  return con;
               }
            }
            catch (XmlBlasterException e) {
               // id.equals("ResourceExhaust")
View Full Code Here


      if (this.poolManager == null) throw new IllegalArgumentException("PoolManager is not initialized");
      int ii=0;
      while (true) {
         try {
            synchronized(this.meetingPoint) {
               ResourceWrapper rw = this.poolManager.reserve(PoolManager.USE_OBJECT_REF);
               Connection con = (Connection)rw.getResource();
               return con;
            }
          }
          catch (XmlBlasterException e) {
             if (e.getErrorCode() == ErrorCode.RESOURCE_EXHAUST && ii < this.maxResourceExhaustRetries) {
View Full Code Here

      }
      TestResource reserve(String instanceId) {
         System.out.println("Entering reserve(" + instanceId + ") ...");
         try {
            synchronized (this) {
               ResourceWrapper rw = (ResourceWrapper) poolManager.reserve(instanceId);
               TestResource rr = (TestResource) rw.getResource();
               if (rr == null)
                  fail("*****ERROR:rr==null");
               rr.instanceId = rw.getInstanceId(); // remember the generated unique id
               return rr;
            }
         }
         catch (XmlBlasterException e) {
            System.err.println("*****WARNING:Caught exception in reserve(): " + e.getMessage());
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.pool.ResourceWrapper

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.