org.apache.geronimo.connector.work
Class GeronimoWorkManager

java.lang.Object
  extended by org.apache.geronimo.connector.work.GeronimoWorkManager
All Implemented Interfaces:
WorkManager

public class GeronimoWorkManager
extends Object
implements WorkManager

WorkManager implementation which uses under the cover three WorkExecutorPool - one for each synchronization policy - in order to dispatch the submitted Work instances.

A WorkManager is a component of the JCA specifications, which allows a Resource Adapter to submit tasks to an Application Server for execution.


Field Summary
 
Fields inherited from interface javax.resource.spi.work.WorkManager
IMMEDIATE, INDEFINITE, UNKNOWN
 
Constructor Summary
GeronimoWorkManager()
          Create a WorkManager.
GeronimoWorkManager(Executor sync, Executor start, Executor sched, org.apache.geronimo.transaction.manager.XAWork xaWork)
           
 
Method Summary
 void doFail()
           
 void doStart()
           
 void doStop()
           
 void doWork(Work work)
           
 void doWork(Work work, long startTimeout, ExecutionContext execContext, WorkListener workListener)
           
 Executor getScheduledWorkExecutorPool()
           
 Executor getStartWorkExecutorPool()
           
 Executor getSyncWorkExecutorPool()
           
 void scheduleWork(Work work)
           
 void scheduleWork(Work work, long startTimeout, ExecutionContext execContext, WorkListener workListener)
           
 long startWork(Work work)
           
 long startWork(Work work, long startTimeout, ExecutionContext execContext, WorkListener workListener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeronimoWorkManager

public GeronimoWorkManager()
Create a WorkManager.


GeronimoWorkManager

public GeronimoWorkManager(Executor sync,
                           Executor start,
                           Executor sched,
                           org.apache.geronimo.transaction.manager.XAWork xaWork)
Method Detail

doStart

public void doStart()
             throws Exception
Throws:
Exception

doStop

public void doStop()
            throws Exception
Throws:
Exception

doFail

public void doFail()

getSyncWorkExecutorPool

public Executor getSyncWorkExecutorPool()

getStartWorkExecutorPool

public Executor getStartWorkExecutorPool()

getScheduledWorkExecutorPool

public Executor getScheduledWorkExecutorPool()

doWork

public void doWork(Work work)
            throws WorkException
Specified by:
doWork in interface WorkManager
Throws:
WorkException

doWork

public void doWork(Work work,
                   long startTimeout,
                   ExecutionContext execContext,
                   WorkListener workListener)
            throws WorkException
Specified by:
doWork in interface WorkManager
Throws:
WorkException

startWork

public long startWork(Work work)
               throws WorkException
Specified by:
startWork in interface WorkManager
Throws:
WorkException

startWork

public long startWork(Work work,
                      long startTimeout,
                      ExecutionContext execContext,
                      WorkListener workListener)
               throws WorkException
Specified by:
startWork in interface WorkManager
Throws:
WorkException

scheduleWork

public void scheduleWork(Work work)
                  throws WorkException
Specified by:
scheduleWork in interface WorkManager
Throws:
WorkException

scheduleWork

public void scheduleWork(Work work,
                         long startTimeout,
                         ExecutionContext execContext,
                         WorkListener workListener)
                  throws WorkException
Specified by:
scheduleWork in interface WorkManager
Throws:
WorkException


Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.