Skip to content
Permalink
Browse files
supply an error code when an unknown context is encountered
  • Loading branch information
djencks committed Mar 17, 2010
1 parent e56d075 commit 6ea7173fe78ccaf9fd8743a457214b3d1a160333
Showing 1 changed file with 2 additions and 1 deletion.
@@ -27,6 +27,7 @@
import javax.resource.NotSupportedException;
import javax.resource.spi.work.ExecutionContext;
import javax.resource.spi.work.WorkContext;
import javax.resource.spi.work.WorkContextErrorCodes;
import javax.resource.spi.work.WorkContextProvider;
import javax.resource.spi.work.TransactionContext;
import javax.resource.spi.work.Work;
@@ -331,7 +332,7 @@ public void run() {
}
}
if (!found) {
throw new WorkCompletedException("Duplicate or unhandled WorkContext: " + workContext);
throw new WorkCompletedException("Duplicate or unhandled WorkContext: " + workContext, WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE);
}
}
for (Iterator<WorkContextHandler> it = workContextHandlers.iterator(); it.hasNext();) {

0 comments on commit 6ea7173

Please sign in to comment.