org.jwarp.service.objectpool
Class ObjectPoolService

java.lang.Object
  |
  +--org.jwarp.service.AService
        |
        +--org.jwarp.service.objectpool.ObjectPoolService
All Implemented Interfaces:
IConfigurable, IExceptionProvider, IObjectPoolService, IReferenceable, IService

public class ObjectPoolService
extends AService
implements IObjectPoolService

The object pool service handles object beans within. It can be maed persistent throuh the use of a castor based persistence service. If you pass null as persistence service then a RAM pool is created.

Version:
1.0
Author:
Anatole Tresch

Field Summary
(package private)  java.util.Hashtable pools
           
 
Fields inherited from class org.jwarp.service.AService
context, createdDate, dependencies, emptyProperties, exceptionListeners, log, resumedDate, serviceName, serviceStatus, serviceType, startedDate, stoppedDate, suspendedDate, systemTicket
 
Fields inherited from interface org.jwarp.service.objectpool.IObjectPoolService
SERVICE_TYPE
 
Fields inherited from interface org.jwarp.service.IService
SERVICE_STATUS_CREATED, SERVICE_STATUS_NOT_AVAILABLE, SERVICE_STATUS_READY, SERVICE_STATUS_RESUMING, SERVICE_STATUS_RUNNING, SERVICE_STATUS_STARTING, SERVICE_STATUS_STOPPED, SERVICE_STATUS_STOPPING, SERVICE_STATUS_SUSPENDED
 
Constructor Summary
ObjectPoolService()
           
 
Method Summary
 void configure(org.jdom.Element config)
          Pass the Configuration to the Configurable class.
 IPersistentObjectPool createPersistentPool(java.lang.String name, java.lang.String className, java.lang.String configUrl, ITicket user)
           
 IObjectPool createPool(java.lang.String name, java.lang.String className, ITicket user)
           
 IObjectPool getObjectPool(java.lang.String name, ITicket user)
           
 IObjectPool removePool(java.lang.String name, ITicket user)
           
 
Methods inherited from class org.jwarp.service.AService
addExceptionListener, checkContext, createLogFromXML, getContext, getCreationDate, getDependencies, getExceptionListeners, getLog, getLogLevel, getName, getReference, getResumedDate, getShutDownDate, getStartDate, getStatus, getSuspendedDate, getType, removeAllExceptionListeners, removeExceptionListener, resume, sendExceptionEvent, setContext, setDependencies, setLogLevel, setName, shutdown, start, suspend
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jwarp.service.IService
checkContext, getDependencies, getLogLevel, getName, getStatus, getType, resume, setContext, setDependencies, setLogLevel, shutdown, start, suspend
 
Methods inherited from interface org.jwarp.common.IExceptionProvider
addExceptionListener, getExceptionListeners, removeAllExceptionListeners, removeExceptionListener
 

Field Detail

pools

java.util.Hashtable pools
Constructor Detail

ObjectPoolService

public ObjectPoolService()
Method Detail

configure

public void configure(org.jdom.Element config)
               throws ConfigurationException
Description copied from interface: IConfigurable
Pass the Configuration to the Configurable class. This method must always be called after the constructor and before any other method.
Specified by:
configure in interface IConfigurable
Overrides:
configure in class AService
Following copied from interface: org.jwarp.service.configuration.IConfigurable
Parameters:
configuration - the class configurations.

createPool

public IObjectPool createPool(java.lang.String name,
                              java.lang.String className,
                              ITicket user)
                       throws java.lang.SecurityException
Specified by:
createPool in interface IObjectPoolService

createPersistentPool

public IPersistentObjectPool createPersistentPool(java.lang.String name,
                                                  java.lang.String className,
                                                  java.lang.String configUrl,
                                                  ITicket user)
                                           throws java.lang.SecurityException,
                                                  PersistenceException
Specified by:
createPersistentPool in interface IObjectPoolService

removePool

public IObjectPool removePool(java.lang.String name,
                              ITicket user)
                       throws java.lang.SecurityException
Specified by:
removePool in interface IObjectPoolService

getObjectPool

public IObjectPool getObjectPool(java.lang.String name,
                                 ITicket user)
Specified by:
getObjectPool in interface IObjectPoolService

©   O R C A   S y s t e m s