if( timerService == null ) {
throw new IllegalStateException
("EJBTimerService is not available");
}
ComponentInvocation inv = ejbContainerUtil.getCurrentInvocation();
if (inv == null) {
throw new IllegalStateException
("Invocation cannot be null");
}
ComponentInvocation.ComponentInvocationType invType = inv.getInvocationType();
if( invType == ComponentInvocation.ComponentInvocationType.EJB_INVOCATION ) {
if ( inv instanceof EjbInvocation ) {
ComponentContext context = ((EjbInvocation) inv).context;
// Delegate check to EJB context. Let any
// IllegalStateException bubble up.