private void queueOrStartNpTimer(BeanO beanO, TimerNpImpl timer) throws EJBException {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();

        try {
            // d589357 - Prevent NP timers from being created after the
            // application has been stopped.  This call will race if it occurs on
            // a thread other than the one stopping the application, but
            // EJBApplicationMeaData.queueOrStartNonPersistentTimerAlarm won't
            // actually start the alarm.
            EJBModuleMetaDataImpl mmd = beanO.getHome().getBeanMetaData()._moduleMetaData;
            mmd.getEJBApplicationMetaData().checkIfCreateNonPersistentTimerAllowed(mmd);

            ContainerTx tx = beanO.getContainerTx();
            if (tx == null) {
                if (isTraceOn && tc.isDebugEnabled())
                    Tr.debug(tc, "queueOrStartNpTimer found ivContainerTx null.  Calling getCurrentTx(false)");

                tx = beanO.getContainer().getCurrentContainerTx();
            }

            if (tx != null) {
                // Will queue timer for global / start immediately for local transactions
                tx.queueTimerToStart(timer);
            } else {
                // Here for backward compatibility. Could only occur for EJB 1.1
                // module with BMT bean, which the customer has re-coded to
                // implement TimedObject. Start the timer immediately, as this
                // would be a local transaction scenario in later module levels.
                if (isTraceOn && tc.isDebugEnabled())
                    Tr.debug(tc, "Container Tx not found; starting timer immediately.");
                timer.start();
            }
        } catch (Exception e) {
            throw ExceptionUtil.EJBException(e);
        }
    }
private void queueOrStartNpTimer ( BeanO beanO , TimerNpImpl timer ) throws EJBException { final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; try { EJBModuleMetaDataImpl mmd = beanO . getHome ( ) . getBeanMetaData ( ) . _moduleMetaData ; mmd . getEJBApplicationMetaData ( ) . checkIfCreateNonPersistentTimerAllowed ( mmd ) ; ContainerTx tx = beanO . getContainerTx ( ) ; if ( tx == null ) { if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "queueOrStartNpTimer found ivContainerTx null.  Calling getCurrentTx(false)" ) ; tx = beanO . getContainer ( ) . getCurrentContainerTx ( ) ; } if ( tx != null ) { tx . queueTimerToStart ( timer ) ; } else { if ( isTraceOn && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Container Tx not found; starting timer immediately." ) ; timer . start ( ) ; } } catch ( Exception e ) { throw ExceptionUtil . EJBException ( e ) ; } }
RTC107334