private void setup(WorkWrapper wrapper, WorkListener workListener) throws WorkCompletedException, WorkException
{
if (trace)
log.tracef("Setting up work: %s, work listener: %s", wrapper, workListener);
Work work = wrapper.getWork();
//If work is an instanceof ResourceAdapterAssociation
if (resourceAdapter != null && work instanceof ResourceAdapterAssociation)
{
try
{
ResourceAdapterAssociation raa = (ResourceAdapterAssociation)work;
raa.setResourceAdapter(resourceAdapter);
}
catch (Throwable t)
{
throw new WorkException(bundle.resourceAdapterAssociationFailed(work.getClass().getName()), t);
}
}
//If work is an instanceof WorkContextProvider
if (work instanceof WorkContextProvider)