|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.connectors.work.WorkCoordinator
public final class WorkCoordinator
WorkCoordinator : Coordinates one work's execution. Handles all exception conditions and does JTS coordination.
| Constructor Summary | |
|---|---|
WorkCoordinator(Work work,
long timeout,
ExecutionContext ec,
com.sun.corba.ee.spi.orbutil.threadpool.WorkQueue queue,
WorkListener listener,
WorkManagementProbeProvider probeProvider,
ConnectorRuntime runtime,
java.lang.String raName,
WorkContextHandler handler)
Constructs a coordinator |
|
| Method Summary | |
|---|---|
WorkException |
getException()
Retrieves the exception created during the work's execution. |
static ExecutionContext |
getExecutionContext(ExecutionContext ec,
Work work)
|
java.lang.String |
getRAName()
|
int |
getState()
Retrieves the state of the work coordinator object. |
boolean |
isTimedOut()
|
void |
lock()
Lock the thread upto the end of execution or start of work execution. |
void |
postInvoke()
Post-invoke operation. |
void |
preInvoke()
Pre-invoke operation. |
boolean |
proceed()
Checks the work is good to proceed with further processing. |
void |
setException(java.lang.Throwable e)
Accepts an exception object and converts to a WorkException object. |
void |
setState(int state)
Sets the state of the work coordinator object |
void |
setupContext(OneWork oneWork)
|
void |
submitWork(int waitModeValue)
Submits the work to the queue and generates a work accepted event. |
java.lang.String |
toString()
Returns the string representation of WorkCoordinator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WorkCoordinator(Work work,
long timeout,
ExecutionContext ec,
com.sun.corba.ee.spi.orbutil.threadpool.WorkQueue queue,
WorkListener listener,
WorkManagementProbeProvider probeProvider,
ConnectorRuntime runtime,
java.lang.String raName,
WorkContextHandler handler)
work - A work object as submitted by the resource adaptertimeout - timeout for the work instanceec - ExecutionContext object.queue - WorkQueue of the threadpool, to which the work
will be submittedlistener - WorkListener object from the resource adapter.| Method Detail |
|---|
public java.lang.String getRAName()
public void submitWork(int waitModeValue)
public void preInvoke()
1. Notifies the WorkManager.startWork method.
2. Checks whether the wok has already been timed out.
3. Recreates the transaction with JTS.
public void setupContext(OneWork oneWork)
throws WorkException
WorkExceptionpublic void postInvoke()
1. Releases the transaction with JTS. 2. Generates work completed event. 3. Clear the thread context.
public boolean proceed()
public boolean isTimedOut()
public WorkException getException()
WorkException object.public void setException(java.lang.Throwable e)
WorkException object.
e - Throwable object.public void lock()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setState(int state)
state - CREATED or Either STARTED or COMPLETED or TIMEDOUTpublic int getState()
public static ExecutionContext getExecutionContext(ExecutionContext ec,
Work work)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||