RejectedExecutionHandler handler = this.rejectedExecutionHandler;
if (handler == null) {
final String rejectedExecutionHandlerClass = options.get(prefix + ".RejectedExecutionHandlerClass", (String) null);
if (rejectedExecutionHandlerClass == null) {
final Duration duration = options.get(prefix + ".OfferTimeout", new Duration(30, TimeUnit.SECONDS));
handler = new OfferRejectedExecutionHandler(duration);
} else {
try {
handler = RejectedExecutionHandler.class.cast(Thread.currentThread().getContextClassLoader().loadClass(rejectedExecutionHandlerClass).newInstance());
} catch (final Exception e) {
throw new OpenEJBRuntimeException(e);