public TimerService getTimerService() throws IllegalStateException {
check(Call.getTimerService);
ThreadContext threadContext = ThreadContext.getThreadContext();
BeanContext beanContext = threadContext.getBeanContext();
EjbTimerService timerService = beanContext.getEjbTimerService();
if (timerService == null) {
throw new IllegalStateException("This ejb does not support timers " + beanContext.getDeploymentID());
}
return new TimerServiceImpl(timerService, threadContext.getPrimaryKey(), beanContext.getEjbTimeout());
}