code: @Override
      public void checkTimerServiceAccess() throws IllegalStateException {
          // -----------------------------------------------------------------------
          // EJB Specification 2.1, 7.6.1 - Timer methods are only allowed during
          // business methods, afterBegin and beforeCompletion.
          // - Note that with Java EE 1.3 (EJB 2.0), business methods will not longer
          //   run in the IN_METHOD state, as there will be a Local Tran.
          // -----------------------------------------------------------------------
          if ((state == TX_IN_METHOD) || // business method
              (state == AFTER_BEGIN) || // afterBegin
              (state == COMMITTING_OUTSIDE_METHOD)) // beforeCompletion
          {
              // Timer Service operations are allowed.
              return;
          } else {
              IllegalStateException ise;
  
              ise = new IllegalStateException("StatefulBean: Timer Service methods " +
                                              "not allowed from state = " +
                                              getStateName(state));
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "checkTimerServiceAccess: " + ise);
  
              throw ise;
          }
      }
docs: LI2281.07