2 Replies Latest reply on Jan 17, 2005 10:32 AM by Larry Wilson

    Starting a function by using a timer

    hannesbacke Newbie

      Hi,
      I just want to execute a class/method by using a timer in jboss 3.2.5. I tried some tutorials with no positive result.
      I ve done in the jboss-service.xml:



      <!--
      true
      <MY CLASS>
      NOW
      5000
      -1



      -->

      But I get always error messages like:
      java.lang.ClassNotFoundException: No ClassLoaders found for:...

      Thats maybe because of the system does not already loaded the class in my deploy file. Does anyone has an idea?
      Thx,
      Hannes

        • 1. Re: Starting a function by using a timer
          hannesbacke Newbie

           

          "HannesBacke" wrote:
          Hi,
          I just want to execute a class/method by using a timer in jboss 3.2.5. I tried some tutorials with no positive result.
          I ve done in the jboss-service.xml:

          <mbean code="javax.management.timer.Timer" name="DefaultDomain:service=timer"/>

          <!--<mbean code="org.jboss.varia.scheduler.Scheduler" name="acme:service=Scheduler">
          <attribute name="StartAtStartup">true</attribute>
          <attribute name="SchedulableClass"><MY CLASS></attribute>
          <attribute name="InitialStartDate">NOW</attribute>
          <attribute name="SchedulePeriod">5000</attribute>
          <attribute name="InitialRepetitions">-1</attribute>
          <depends>
          <mbean code="javax.management.timer.Timer" name="jboss:service=Timer"/>
          </depends>
          </mbean>-->

          But I get always error messages like:
          java.lang.ClassNotFoundException: No ClassLoaders found for:...

          Thats maybe because of the system does not already loaded the class in my deploy file. Does anyone has an idea?
          Thx,
          Hannes


          • 2. Re: Starting a function by using a timer
            Larry Wilson Newbie

            If you touch (Linux) or resave the scheduler-service.xml file after JBoss has finished starting, you'll likely get your services started.

            Hope this helps.