javax.resource.spi.work.WorkRejectedException Java Examples
The following examples show how to use
javax.resource.spi.work.WorkRejectedException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WorkManagerImpl.java From lams with GNU General Public License v2.0 | 6 votes |
/** * Check and verify work before submitting. * @param work the work instance * @param executionContext any execution context that is passed by apadater * @throws WorkException if any exception occurs */ private void checkAndVerifyWork(Work work, ExecutionContext executionContext) throws WorkException { if (specCompliant) { verifyWork(work); } if (work instanceof WorkContextProvider) { //Implements WorkContextProvider and not-null ExecutionContext if (executionContext != null) { throw new WorkRejectedException(bundle.workExecutionContextMustNullImplementsWorkContextProvider()); } } }
Example #2
Source File: WorkManagerImpl.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Do first checks for work starting methods * @param work to check * @param startTimeout to check * @param execContext to check * @throws WorkException in case of check don't pass */ public void doFirstChecks(Work work, long startTimeout, ExecutionContext execContext) throws WorkException { if (isShutdown()) throw new WorkRejectedException(bundle.workmanagerShutdown()); if (work == null) throw new WorkRejectedException(bundle.workIsNull()); if (startTimeout < 0) throw new WorkRejectedException(bundle.startTimeoutIsNegative(startTimeout)); checkAndVerifyWork(work, execContext); }
Example #3
Source File: WorkManagerImpl.java From ironjacamar with Eclipse Public License 1.0 | 5 votes |
/** * Do first checks for work starting methods * @param work to check * @param startTimeout to check * @param execContext to check * @throws WorkException in case of check don't pass */ public void doFirstChecks(Work work, long startTimeout, ExecutionContext execContext) throws WorkException { if (isShutdown()) throw new WorkRejectedException(bundle.workmanagerShutdown()); if (work == null) throw new WorkRejectedException(bundle.workIsNull()); if (startTimeout < 0) throw new WorkRejectedException(bundle.startTimeoutIsNegative(startTimeout)); checkAndVerifyWork(work, execContext); }
Example #4
Source File: WorkManagerImpl.java From ironjacamar with Eclipse Public License 1.0 | 5 votes |
/** * Check and verify work before submitting. * @param work the work instance * @param executionContext any execution context that is passed by apadater * @throws WorkException if any exception occurs */ private void checkAndVerifyWork(Work work, ExecutionContext executionContext) throws WorkException { if (specCompliant) { verifyWork(work); } if (work instanceof WorkContextProvider && executionContext != null) { //Implements WorkContextProvider and not-null ExecutionContext throw new WorkRejectedException(bundle.workExecutionContextMustNullImplementsWorkContextProvider()); } }