Package commonj.timers

Examples of commonj.timers.TimerManager


      return ( obj != null ) ? obj : SINGLETON_KEY;
   }

   private TimerManager getTimerManager( Context initialContext )
   {
      TimerManager timerManager;
      try
      {
         timerManager = (TimerManager) initialContext.lookup( CONTEXT_NAME_J2EE_TIMER_MANAGER );
      }
      catch ( NamingException ne )
      {
         try
         {
            timerManager = (TimerManager) initialContext.lookup( JndiConstants.CONTEXT_NAME_DEFAULT_TIMER );
         }
         catch ( NamingException ne2 )
         {
            timerManager = new TimerManagerImpl(  );
         }
      }

      LOG.debug( MSG.getMessage( Keys.TIMER_MANAGER_IMPL,
                                 timerManager.getClass(  ).getName(  ) ) );
      return timerManager;
   }
View Full Code Here


    {
        //scale and translate the random to get a number between 1 and 3 mins
        double doubleLength = m_random.nextDouble() * 120000.0 + 60000.0;
        //long doubleLength = 20000; //for debug only...
        long lengthOfTime = (long) doubleLength;
        TimerManager tm = new TimerManagerImpl();
        m_timer = tm.schedule(this, lengthOfTime);
    }
View Full Code Here

TOP

Related Classes of commonj.timers.TimerManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.