Methods Summary |
---|
protected void | cancelWork(WorkWrapper wrapper)Cancel work
ExecutionContext ctx = wrapper.getExecutionContext();
if (ctx != null)
{
Xid xid = ctx.getXid();
if (xid != null)
{
xaTerminator.cancelWork(wrapper.getWork(), xid);
}
}
|
public void | doWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext ctx, javax.resource.spi.work.WorkListener listener)
if (ctx == null)
ctx = new ExecutionContext();
WorkWrapper wrapper = new WorkWrapper(this, work, Task.WAIT_FOR_COMPLETE, startTimeout, ctx, listener);
importWork(wrapper);
executeWork(wrapper);
if (wrapper.getWorkException() != null)
throw wrapper.getWorkException();
|
public void | doWork(javax.resource.spi.work.Work work)
doWork(work, WorkManager.INDEFINITE, null, null);
|
protected void | endWork(WorkWrapper wrapper)End work
ExecutionContext ctx = wrapper.getExecutionContext();
if (ctx != null)
{
Xid xid = ctx.getXid();
if (xid != null)
{
xaTerminator.endWork(wrapper.getWork(), xid);
}
}
|
protected void | executeWork(WorkWrapper wrapper)Execute the work
threadPool.runTaskWrapper(wrapper);
|
public javax.resource.spi.work.WorkManager | getInstance()
return this;
|
public javax.management.ObjectName | getXATerminatorName()
return xaTerminatorName;
|
protected void | importWork(WorkWrapper wrapper)Import any work
ExecutionContext ctx = wrapper.getExecutionContext();
if (ctx != null)
{
Xid xid = ctx.getXid();
if (xid != null)
{
long timeout = ctx.getTransactionTimeout();
xaTerminator.registerWork(wrapper.getWork(), xid, timeout);
}
}
|
public void | scheduleWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext ctx, javax.resource.spi.work.WorkListener listener)
if (ctx == null)
ctx = new ExecutionContext();
WorkWrapper wrapper = new WorkWrapper(this, work, Task.WAIT_NONE, startTimeout, ctx, listener);
importWork(wrapper);
executeWork(wrapper);
if (wrapper.getWorkException() != null)
throw wrapper.getWorkException();
|
public void | scheduleWork(javax.resource.spi.work.Work work)
scheduleWork(work, WorkManager.INDEFINITE, null, null);
|
public void | setXATerminatorName(javax.management.ObjectName xaTerminatorName)
this.xaTerminatorName = xaTerminatorName;
|
protected void | startWork(WorkWrapper wrapper)Start work
ExecutionContext ctx = wrapper.getExecutionContext();
if (ctx != null)
{
Xid xid = ctx.getXid();
if (xid != null)
{
xaTerminator.startWork(wrapper.getWork(), xid);
}
}
|
public long | startWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext ctx, javax.resource.spi.work.WorkListener listener)
if (ctx == null)
ctx = new ExecutionContext();
WorkWrapper wrapper = new WorkWrapper(this, work, Task.WAIT_FOR_START, startTimeout, ctx, listener);
importWork(wrapper);
executeWork(wrapper);
if (wrapper.getWorkException() != null)
throw wrapper.getWorkException();
return wrapper.getBlockedElapsed();
|
public long | startWork(javax.resource.spi.work.Work work)
return startWork(work, WorkManager.INDEFINITE, null, null);
|