public class org.springframework.jca.work.SimpleTaskWorkManager extends java.lang.Object implements javax.resource.spi.work.WorkManager
{
private org.springframework.core.task.TaskExecutor syncTaskExecutor;
private org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor;
public void <init>()
{
org.springframework.core.task.SimpleAsyncTaskExecutor v;
org.springframework.core.task.SyncTaskExecutor v;
org.springframework.jca.work.SimpleTaskWorkManager v;
v := @this: org.springframework.jca.work.SimpleTaskWorkManager;
specialinvoke v.<java.lang.Object: void <init>()>();
v = new org.springframework.core.task.SyncTaskExecutor;
specialinvoke v.<org.springframework.core.task.SyncTaskExecutor: void <init>()>();
v.<org.springframework.jca.work.SimpleTaskWorkManager: org.springframework.core.task.TaskExecutor syncTaskExecutor> = v;
v = new org.springframework.core.task.SimpleAsyncTaskExecutor;
specialinvoke v.<org.springframework.core.task.SimpleAsyncTaskExecutor: void <init>()>();
v.<org.springframework.jca.work.SimpleTaskWorkManager: org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor> = v;
return;
}
public void setSyncTaskExecutor(org.springframework.core.task.TaskExecutor)
{
org.springframework.core.task.TaskExecutor v;
org.springframework.jca.work.SimpleTaskWorkManager v;
v := @this: org.springframework.jca.work.SimpleTaskWorkManager;
v := @parameter: org.springframework.core.task.TaskExecutor;
v.<org.springframework.jca.work.SimpleTaskWorkManager: org.springframework.core.task.TaskExecutor syncTaskExecutor> = v;
return;
}
public void setAsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor)
{
org.springframework.core.task.AsyncTaskExecutor v;
org.springframework.jca.work.SimpleTaskWorkManager v;
v := @this: org.springframework.jca.work.SimpleTaskWorkManager;
v := @parameter: org.springframework.core.task.AsyncTaskExecutor;
v.<org.springframework.jca.work.SimpleTaskWorkManager: org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor> = v;
return;
}
public void doWork(javax.resource.spi.work.Work) throws javax.resource.spi.work.WorkException
{
javax.resource.spi.work.Work v;
org.springframework.jca.work.SimpleTaskWorkManager v;
v := @this: org.springframework.jca.work.SimpleTaskWorkManager;
v := @parameter: javax.resource.spi.work.Work;
virtualinvoke v.<org.springframework.jca.work.SimpleTaskWorkManager: void doWork(javax.resource.spi.work.Work,long,javax.resource.spi.work.ExecutionContext,javax.resource.spi.work.WorkListener)>(v, 9223372036854775807L, null, null);
return;
}
public void doWork(javax.resource.spi.work.Work, long, javax.resource.spi.work.ExecutionContext, javax.resource.spi.work.WorkListener) throws javax.resource.spi.work.WorkException
{
javax.resource.spi.work.ExecutionContext v;
long v;
javax.resource.spi.work.WorkListener v;
org.springframework.jca.work.SimpleTaskWorkManager v;
javax.resource.spi.work.Work v;
org.springframework.core.task.TaskExecutor v, v;
boolean v;
v := @this: org.springframework.jca.work.SimpleTaskWorkManager;
v := @parameter: javax.resource.spi.work.Work;
v := @parameter: long;
v := @parameter: javax.resource.spi.work.ExecutionContext;
v := @parameter: javax.resource.spi.work.WorkListener;
v = v.<org.springframework.jca.work.SimpleTaskWorkManager: org.springframework.core.task.TaskExecutor syncTaskExecutor>;
if v == null goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <org.springframework.util.Assert: void state(boolean,java.lang.String)>(v, "No \'syncTaskExecutor\' set");
v = v.<org.springframework.jca.work.SimpleTaskWorkManager: org.springframework.core.task.TaskExecutor syncTaskExecutor>;
virtualinvoke v.<org.springframework.jca.work.SimpleTaskWorkManager: long executeWork(org.springframework.core.task.TaskExecutor,javax.resource.spi.work.Work,long,boolean,javax.resource.spi.work.ExecutionContext,javax.resource.spi.work.WorkListener)>(v, v, v, 0, v, v);
return;
}
public long startWork(javax.resource.spi.work.Work) throws javax.resource.spi.work.WorkException
{
javax.resource.spi.work.Work v;
long v;
org.springframework.jca.work.SimpleTaskWorkManager v;
v := @this: org.springframework.jca.work.SimpleTaskWorkManager;
v := @parameter: javax.resource.spi.work.Work;
v = virtualinvoke v.<org.springframework.jca.work.SimpleTaskWorkManager: long startWork(javax.resource.spi.work.Work,long,javax.resource.spi.work.ExecutionContext,javax.resource.spi.work.WorkListener)>(v, 9223372036854775807L, null, null);
return v;
}
public long startWork(javax.resource.spi.work.Work, long, javax.resource.spi.work.ExecutionContext, javax.resource.spi.work.WorkListener) throws javax.resource.spi.work.WorkException
{
javax.resource.spi.work.ExecutionContext v;
org.springframework.core.task.AsyncTaskExecutor v, v;
long v, v;
javax.resource.spi.work.WorkListener v;
org.springframework.jca.work.SimpleTaskWorkManager v;
javax.resource.spi.work.Work v;
boolean v;
v := @this: org.springframework.jca.work.SimpleTaskWorkManager;
v := @parameter: javax.resource.spi.work.Work;
v := @parameter: long;
v := @parameter: javax.resource.spi.work.ExecutionContext;
v := @parameter: javax.resource.spi.work.WorkListener;
v = v.<org.springframework.jca.work.SimpleTaskWorkManager: org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor>;
if v == null goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <org.springframework.util.Assert: void state(boolean,java.lang.String)>(v, "No \'asyncTaskExecutor\' set");
v = v.<org.springframework.jca.work.SimpleTaskWorkManager: org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor>;
v = virtualinvoke v.<org.springframework.jca.work.SimpleTaskWorkManager: long executeWork(org.springframework.core.task.TaskExecutor,javax.resource.spi.work.Work,long,boolean,javax.resource.spi.work.ExecutionContext,javax.resource.spi.work.WorkListener)>(v, v, v, 1, v, v);
return v;
}
public void scheduleWork(javax.resource.spi.work.Work) throws javax.resource.spi.work.WorkException
{
javax.resource.spi.work.Work v;
org.springframework.jca.work.SimpleTaskWorkManager v;
v := @this: org.springframework.jca.work.SimpleTaskWorkManager;
v := @parameter: javax.resource.spi.work.Work;
virtualinvoke v.<org.springframework.jca.work.SimpleTaskWorkManager: void scheduleWork(javax.resource.spi.work.Work,long,javax.resource.spi.work.ExecutionContext,javax.resource.spi.work.WorkListener)>(v, 9223372036854775807L, null, null);
return;
}
public void scheduleWork(javax.resource.spi.work.Work, long, javax.resource.spi.work.ExecutionContext, javax.resource.spi.work.WorkListener) throws javax.resource.spi.work.WorkException
{
javax.resource.spi.work.ExecutionContext v;
org.springframework.core.task.AsyncTaskExecutor v, v;
long v;
javax.resource.spi.work.WorkListener v;
org.springframework.jca.work.SimpleTaskWorkManager v;
javax.resource.spi.work.Work v;
boolean v;
v := @this: org.springframework.jca.work.SimpleTaskWorkManager;
v := @parameter: javax.resource.spi.work.Work;
v := @parameter: long;
v := @parameter: javax.resource.spi.work.ExecutionContext;
v := @parameter: javax.resource.spi.work.WorkListener;
v = v.<org.springframework.jca.work.SimpleTaskWorkManager: org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor>;
if v == null goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <org.springframework.util.Assert: void state(boolean,java.lang.String)>(v, "No \'asyncTaskExecutor\' set");
v = v.<org.springframework.jca.work.SimpleTaskWorkManager: org.springframework.core.task.AsyncTaskExecutor asyncTaskExecutor>;
virtualinvoke v.<org.springframework.jca.work.SimpleTaskWorkManager: long executeWork(org.springframework.core.task.TaskExecutor,javax.resource.spi.work.Work,long,boolean,javax.resource.spi.work.ExecutionContext,javax.resource.spi.work.WorkListener)>(v, v, v, 0, v, v);
return;
}
protected long executeWork(org.springframework.core.task.TaskExecutor, javax.resource.spi.work.Work, long, boolean, javax.resource.spi.work.ExecutionContext, javax.resource.spi.work.WorkListener) throws javax.resource.spi.work.WorkException
{
javax.resource.spi.work.WorkEvent v, v, v;
org.springframework.core.task.TaskRejectedException v;
org.springframework.jca.work.SimpleTaskWorkManager v;
java.lang.Thread v;
org.springframework.core.task.TaskExecutor v;
boolean v, v, v, v;
javax.resource.spi.work.WorkListener v;
org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter v;
java.lang.Throwable v, v;
javax.resource.spi.work.ExecutionContext v;
long v, v, v, v;
org.springframework.core.task.TaskTimeoutException v;
javax.resource.spi.work.WorkException v, v;
java.lang.String v, v, v, v;
javax.transaction.xa.Xid v, v;
javax.resource.spi.work.WorkAdapter v;
javax.resource.spi.work.Work v;
java.lang.InterruptedException v;
javax.resource.spi.work.WorkRejectedException v, v;
java.lang.Object v, v, v, v;
v := @this: org.springframework.jca.work.SimpleTaskWorkManager;
v := @parameter: org.springframework.core.task.TaskExecutor;
v := @parameter: javax.resource.spi.work.Work;
v := @parameter: long;
v := @parameter: boolean;
v := @parameter: javax.resource.spi.work.ExecutionContext;
v := @parameter: javax.resource.spi.work.WorkListener;
if v == null goto label;
v = virtualinvoke v.<javax.resource.spi.work.ExecutionContext: javax.transaction.xa.Xid getXid()>();
if v == null goto label;
v = new javax.resource.spi.work.WorkException;
v = virtualinvoke v.<javax.resource.spi.work.ExecutionContext: javax.transaction.xa.Xid getXid()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (javax.transaction.xa.Xid)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("SimpleTaskWorkManager does not supported imported XIDs: \u0001");
specialinvoke v.<javax.resource.spi.work.WorkException: void <init>(java.lang.String)>(v);
throw v;
label:
v = v;
if v != null goto label;
v = new javax.resource.spi.work.WorkAdapter;
specialinvoke v.<javax.resource.spi.work.WorkAdapter: void <init>()>();
v = v;
label:
v = v instanceof org.springframework.core.task.AsyncTaskExecutor;
v = new org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter;
v = v;
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
specialinvoke v.<org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter: void <init>(javax.resource.spi.work.Work,javax.resource.spi.work.WorkListener,boolean)>(v, v, v);
label:
if v == 0 goto label;
interfaceinvoke v.<org.springframework.core.task.AsyncTaskExecutor: void execute(java.lang.Runnable,long)>(v, v);
goto label;
label:
interfaceinvoke v.<org.springframework.core.task.TaskExecutor: void execute(java.lang.Runnable)>(v);
label:
goto label;
label:
v := @caughtexception;
v = new javax.resource.spi.work.WorkRejectedException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (javax.resource.spi.work.Work)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("TaskExecutor rejected Work because of timeout: \u0001");
specialinvoke v.<javax.resource.spi.work.WorkRejectedException: void <init>(java.lang.String,java.lang.Throwable)>(v, v);
virtualinvoke v.<javax.resource.spi.work.WorkException: void setErrorCode(java.lang.String)>("1");
v = new javax.resource.spi.work.WorkEvent;
specialinvoke v.<javax.resource.spi.work.WorkEvent: void <init>(java.lang.Object,int,javax.resource.spi.work.Work,javax.resource.spi.work.WorkException)>(v, 2, v, v);
interfaceinvoke v.<javax.resource.spi.work.WorkListener: void workRejected(javax.resource.spi.work.WorkEvent)>(v);
throw v;
label:
v := @caughtexception;
v = new javax.resource.spi.work.WorkRejectedException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (javax.resource.spi.work.Work)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("TaskExecutor rejected Work: \u0001");
specialinvoke v.<javax.resource.spi.work.WorkRejectedException: void <init>(java.lang.String,java.lang.Throwable)>(v, v);
virtualinvoke v.<javax.resource.spi.work.WorkException: void setErrorCode(java.lang.String)>("-1");
v = new javax.resource.spi.work.WorkEvent;
specialinvoke v.<javax.resource.spi.work.WorkEvent: void <init>(java.lang.Object,int,javax.resource.spi.work.Work,javax.resource.spi.work.WorkException)>(v, 2, v, v);
interfaceinvoke v.<javax.resource.spi.work.WorkListener: void workRejected(javax.resource.spi.work.WorkEvent)>(v);
throw v;
label:
v := @caughtexception;
v = new javax.resource.spi.work.WorkException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (javax.resource.spi.work.Work)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("TaskExecutor failed to execute Work: \u0001");
specialinvoke v.<javax.resource.spi.work.WorkException: void <init>(java.lang.String,java.lang.Throwable)>(v, v);
virtualinvoke v.<javax.resource.spi.work.WorkException: void setErrorCode(java.lang.String)>("-1");
throw v;
label:
if v == 0 goto label;
v = new javax.resource.spi.work.WorkEvent;
specialinvoke v.<javax.resource.spi.work.WorkEvent: void <init>(java.lang.Object,int,javax.resource.spi.work.Work,javax.resource.spi.work.WorkException)>(v, 1, v, null);
interfaceinvoke v.<javax.resource.spi.work.WorkListener: void workAccepted(javax.resource.spi.work.WorkEvent)>(v);
label:
if v == 0 goto label;
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
v = v.<org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter: java.lang.Object monitor>;
entermonitor v;
label:
v = v.<org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter: boolean started>;
if v != 0 goto label;
v = v.<org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter: java.lang.Object monitor>;
virtualinvoke v.<java.lang.Object: void wait()>();
goto label;
label:
v := @caughtexception;
v = staticinvoke <java.lang.Thread: java.lang.Thread currentThread()>();
virtualinvoke v.<java.lang.Thread: void interrupt()>();
label:
exitmonitor v;
label:
goto label;
label:
v := @caughtexception;
exitmonitor v;
throw v;
label:
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
v = v - v;
return v;
label:
return -1L;
catch org.springframework.core.task.TaskTimeoutException from label to label with label;
catch org.springframework.core.task.TaskRejectedException from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.InterruptedException from label to label with label;
catch java.lang.Throwable from label to label with label;
}
}