("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.
context.checkTimerServiceMethodAccess();
allowed = true;
} else {
// NOTE : There shouldn't be any cases where an EJB
// container uses com.sun.enterprise.ComponentInvocation
// instead of com.sun.ejb.Invocation and timer method