Class JMSConnectorManager.ShareableObjectPool

java.lang.Object
org.apache.axis.transport.jms.JMSConnectorManager.ShareableObjectPool
Enclosing class:
JMSConnectorManager

public class JMSConnectorManager.ShareableObjectPool extends Object
A simple non-blocking pool impl for objects that can be shared. Only a ref count is necessary to prevent collisions at shutdown. Todo: max size, cleanup stale connections
  • Constructor Details

    • ShareableObjectPool

      public ShareableObjectPool()
  • Method Details

    • addObject

      public void addObject(Object obj)
      Adds the object to the pool, if not already added
    • removeObject

      public void removeObject(Object obj, long waitTime)
      Removes the object from the pool. If the object is reserved, waits the specified time before forcibly removing Todo: check expirations with the next request instead of holding up the current request
    • removeObject

      public void removeObject(Object obj)
    • reserve

      public void reserve(Object obj) throws Exception
      Marks the connector as in use by incrementing the connector's reference count
      Throws:
      Exception
    • release

      public void release(Object obj)
      Decrements the connector's reference count
    • getElements

      public Set getElements()
    • size

      public int size()