("Invocation cannot be null");
int invType = inv.getInvocationType();
if( invType == ComponentInvocation.EJB_INVOCATION ) {
if ( inv instanceof Invocation ) {
ComponentContext context = ((Invocation) 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