use of javax.ejb.NoSuchObjectLocalException in project wildfly by wildfly.
the class TimerAttributeDefinition method addNextTimeout.
private static void addNextTimeout(Timer timer, ModelNode timerNode, final String componentName) {
try {
final ModelNode detailNode = timerNode.get(NEXT_TIMEOUT);
Date d = timer.getNextTimeout();
if (d != null) {
detailNode.set(d.getTime());
}
} catch (IllegalStateException e) {
// ignore
} catch (NoSuchObjectLocalException e) {
// ignore
} catch (EJBException e) {
logTimerFailure(componentName, e);
}
}
use of javax.ejb.NoSuchObjectLocalException in project tomee by apache.
the class TimerHandleImpl method getTimer.
public Timer getTimer() {
final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
if (containerSystem == null) {
throw new NoSuchObjectLocalException("OpenEJb container system is not running");
}
final BeanContext beanContext = containerSystem.getBeanContext(deploymentId);
if (beanContext == null) {
throw new NoSuchObjectLocalException("Deployment info not found " + deploymentId);
}
final EjbTimerService timerService = beanContext.getEjbTimerService();
if (timerService == null) {
throw new NoSuchObjectLocalException("Deployment no longer supports ejbTimout " + deploymentId + ". Has this ejb been redeployed?");
}
final Timer timer = timerService.getTimer(id);
if (timer == null) {
throw new NoSuchObjectLocalException("Timer not found for ejb " + deploymentId);
}
return timer;
}
Aggregations