title: Service not registered on startup
body: <p>I am using JBoss5.1.x AS, EJB3.0. I am trying to add a job (using Quartz) to my deployment. I am registering a new Service, so it will init the scheduler on application deploy.</p>
  
  <p>My problem is that the service never gets registered when I deploy my app.</p>
  
  <p>My code:</p>
  
  <p><strong>Interface:</strong></p>
  
  <pre><code>public interface ComponentMonitoringService
  {
      void create() throws Exception;
      void start() throws Exception;
      void stop();
      void destroy();
  }
  </code></pre>
  
  <p><strong>Service:</strong></p>
  
  <pre><code>@Service(objectName = "com.mirs.ecms.timer:service=ServerStartupManager")
  @Management(ComponentMonitoringService.class)
  public class ServerStartupManager implements ComponentMonitoringService
  {
      private SchedulerFactory schedulerFactory = null;
      private Scheduler scheduler = null;
      Logger logger = Logger.getLogger("ecms.log");
  
      public void create() throws Exception
      {
      }
  
      public void start() throws Exception
      {
      // Write your startup code
  
      initScheduler();
      }
  
      private void initScheduler() throws ParseException, SchedulerException
      {
          schedulerFactory = new StdSchedulerFactory();
          scheduler = schedulerFactory.getScheduler();
  
          JobDetail startECMSJob = new JobDetail("startECMSJob", "group1", StartECMSJob.class);
          CronTrigger trigger1 = new CronTrigger("cronTrigger", "TriggersGroup1", "0 0/5 * * * ?");
  
          scheduler.scheduleJob(startECMSJob, trigger1);
  
          scheduler.start();
      }
  
      public void stop()
      {
          try
          {
              scheduler.shutdown();
          }
          catch (Exception e)
          {
              logger.error("ServerStartupManager Failure occured during Manager stop", e);
          }
      }
  
      public void destroy()
      {
      }
  }
  </code></pre>