code: private void checkTimerAccess() throws IllegalStateException {
  
          BeanO beanO = EJSContainer.getCallbackBeanO();
          if (beanO != null) {
              beanO.checkTimerServiceAccess();
          } else if (EJSContainer.getDefaultContainer().allowTimerAccessOutsideBean) {
              // Beginning with EJB 3.2, the specification was updated to allow Timer
              // and TimerHandle access outside of an EJB. Although it would seem to
              // make sense that a Timer could also be accessed from an EJB in any
              // state, that part of the specification was not updated, so the above
              // checking is still performed when there is a callback BeanO.
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "checkTimerAccess: TimerHandle access permitted outside of bean");
          } else {
              // EJB 3.1 and earlier restricted access to the Timer API to beans only
              IllegalStateException ise = new IllegalStateException("TimerHandle methods not allowed - no active EJB");
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "checkTimerAccess: " + ise);
              throw ise;
          }
      }
docs: Determines if Timer methods are allowed based on the current state
  of bean instance associated with the current transaction. This includes
  the methods on the javax.ejb.Timer interface. <p>
  
  Must be called by all Timer methods to insure EJB Specification
  compliance. <p>
  
  Note: This method does not apply to the EJBContext.getTimerService()
  method, as getTimerService may be called for more bean states.
  getTimerServcie() must provide its own checking. <p>
  
  @throws IllegalStateException If this instance is in a state that does
  not allow timer service method operations.