com.sun.enterprise.connectors.work
Class WorkManagerFactory
java.lang.Object
com.sun.enterprise.connectors.work.WorkManagerFactory
- All Implemented Interfaces:
- WorkManagerFactory
@Service
@Scoped(value=org.jvnet.hk2.component.Singleton.class)
public final class WorkManagerFactory
- extends java.lang.Object
- implements WorkManagerFactory
WorkManagerFactory allows other customized WorkManager implementation
to be plugged into the server. The name of the customized
implementation class for the WorkManager has to be specified as
a system property "workmanager.class".
It is assumed that the implementation for WorkManager also provides
a public method called "getInstance" that returns a WorkManager object.
This frees the WorkManagerFactory from deciding whether WorkManager
is implemented as a Singleton in the server.
- Author:
- Qingqing Ouyang, Binod P.G.
|
Method Summary |
WorkManager |
createWorkManager(java.lang.String poolName,
java.lang.String raName,
java.lang.ClassLoader rarCL)
This is called by the constructor of BootstrapContextImpl |
WorkManager |
getWorkManagerProxy(java.lang.String poolId,
java.lang.String moduleName,
java.lang.ClassLoader rarCL)
provides work manager proxy that is Serializable |
boolean |
removeWorkManager(java.lang.String moduleName)
remove the actual work manager from registry |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
workManagers
protected static final java.util.Map<java.lang.String,WorkManager> workManagers
WorkManagerFactory
public WorkManagerFactory()
createWorkManager
public WorkManager createWorkManager(java.lang.String poolName,
java.lang.String raName,
java.lang.ClassLoader rarCL)
- This is called by the constructor of BootstrapContextImpl
- Specified by:
createWorkManager in interface WorkManagerFactory
- Parameters:
poolName - thread pool name
- Returns:
- WorkManager work manager that can be used by resource-adapter
removeWorkManager
public boolean removeWorkManager(java.lang.String moduleName)
- remove the actual work manager from registry
- Specified by:
removeWorkManager in interface WorkManagerFactory
- Parameters:
moduleName - resource-adapter name
- Returns:
- boolean
getWorkManagerProxy
public WorkManager getWorkManagerProxy(java.lang.String poolId,
java.lang.String moduleName,
java.lang.ClassLoader rarCL)
throws ConnectorRuntimeException
- provides work manager proxy that is Serializable
- Specified by:
getWorkManagerProxy in interface WorkManagerFactory
- Parameters:
poolId - ThreadPoolIdmoduleName - resource-adapter name
- Returns:
- WorkManager
- Throws:
ConnectorRuntimeException - when unable to get work manager
Copyright © 2012 GlassFish Community. All Rights Reserved.