org.apache.geronimo.connector.work
Class GeronimoWorkManager

java.lang.Object
  extended byorg.apache.geronimo.connector.work.GeronimoWorkManager
All Implemented Interfaces:
org.apache.geronimo.gbean.GBeanLifecycle, javax.resource.spi.work.WorkManager

public class GeronimoWorkManager
extends Object
implements javax.resource.spi.work.WorkManager, org.apache.geronimo.gbean.GBeanLifecycle

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.

Version:
$Revision: 1.10 $ $Date: 2004/07/15 03:25:36 $

Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Fields inherited from interface javax.resource.spi.work.WorkManager
IMMEDIATE, INDEFINITE, UNKNOWN
 
Constructor Summary
GeronimoWorkManager()
          Create a WorkManager.
GeronimoWorkManager(int syncSize, int startSize, int schedSize, org.apache.geronimo.transaction.XAServices xaServices)
           
GeronimoWorkManager(int size, org.apache.geronimo.transaction.XAServices xaServices)
           
 
Method Summary
 void doFail()
           
 void doStart()
           
 void doStop()
           
 void doWork(javax.resource.spi.work.Work work)
           
 void doWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 int getScheduledMaximumPoolSize()
           
 int getScheduledThreadCount()
           
 int getStartMaximumPoolSize()
           
 int getStartThreadCount()
           
 int getSyncMaximumPoolSize()
           
 int getSyncThreadCount()
           
 javax.resource.spi.XATerminator getXATerminator()
           
 void scheduleWork(javax.resource.spi.work.Work work)
           
 void scheduleWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)
           
 void setScheduledMaximumPoolSize(int maxSize)
           
 void setStartMaximumPoolSize(int maxSize)
           
 void setSyncMaximumPoolSize(int maxSize)
           
 long startWork(javax.resource.spi.work.Work work)
           
 long startWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

GeronimoWorkManager

public GeronimoWorkManager()
Create a WorkManager.


GeronimoWorkManager

public GeronimoWorkManager(int size,
                           org.apache.geronimo.transaction.XAServices xaServices)

GeronimoWorkManager

public GeronimoWorkManager(int syncSize,
                           int startSize,
                           int schedSize,
                           org.apache.geronimo.transaction.XAServices xaServices)
Method Detail

doStart

public void doStart()
             throws org.apache.geronimo.gbean.WaitingException,
                    Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doStop

public void doStop()
            throws org.apache.geronimo.gbean.WaitingException,
                   Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

getXATerminator

public javax.resource.spi.XATerminator getXATerminator()

getSyncThreadCount

public int getSyncThreadCount()

getSyncMaximumPoolSize

public int getSyncMaximumPoolSize()

setSyncMaximumPoolSize

public void setSyncMaximumPoolSize(int maxSize)

getStartThreadCount

public int getStartThreadCount()

getStartMaximumPoolSize

public int getStartMaximumPoolSize()

setStartMaximumPoolSize

public void setStartMaximumPoolSize(int maxSize)

getScheduledThreadCount

public int getScheduledThreadCount()

getScheduledMaximumPoolSize

public int getScheduledMaximumPoolSize()

setScheduledMaximumPoolSize

public void setScheduledMaximumPoolSize(int maxSize)

doWork

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

doWork

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

startWork

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

startWork

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

scheduleWork

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

scheduleWork

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

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


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