}
public TimerService getTimerService() throws IllegalStateException {
ThreadContext threadContext = ThreadContext.getThreadContext();
DeploymentInfo deploymentInfo = threadContext.getDeploymentInfo();
EjbTimerService timerService = deploymentInfo.getEjbTimerService();
if (timerService == null) {
throw new IllegalStateException("This ejb does not support timers " + deploymentInfo.getDeploymentID());
}
return new TimerServiceImpl(timerService, threadContext.getPrimaryKey());
}