title: How to enable Quartz scheduling in Jboss AS 7.0?
body: <p>Quartz doesn't appear to be included with the default install of Jboss AS 7.0 Final (full). Deployment of my EAR appears to fail when the Message Driven Bean (MDB) "FareMonitorBean" is attempted to be loaded. This MDB is what the quartz schedule executes. </p>
  
  <p>Error message:</p>
  
  <pre><code>10:00:34,034 WARN  [org.jboss.modules] (MSC service thread 1-7) Failed to define class com.myproject.beans.FareMonitorBean in Module "deployment.myprojectEAP.ear.myprojectEJB.jar:main" from Service Module Loader: java.lang.LinkageError: Failed to link com/myproject/beans/FareMonitorBean (Module "deployment.myprojectEAP.ear.myprojectEJB.jar:main" from Service Module Loader)
  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)
  .....
  Caused by: java.lang.NoClassDefFoundError: org/quartz/Job
  at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]
  at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_26]
  at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_26]
  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [:1.6.0_26]
  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
  ... 18 more
  </code></pre>
  
  <p>Summary of MDB "FareMonitorBean" class file :</p>
  
  <pre><code>@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "cronTrigger", propertyValue = EJBConstants.FARE_MONITOR_QUARTZ_SCHEDULE_STRING) })
  @ResourceAdapter("quartz-jboss-2.0.2.jar")
  public class FareMonitorBean implements Job {
  
      public void execute(JobExecutionContext arg0) throws JobExecutionException {
          ....
      }
  }
  </code></pre>
  
  <p>Based on the <a href="https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-Generalconfigurationconcepts" rel="nofollow">JBoss documentation</a>, my guess is that an "Extension" and "Subsystem" needs to be configured for Quartz in standalone/configuration/standalone.xml, however I'm not sure how to do this. I have searched google, jboss forums, quartz support doco and can't find anything. It seems a bit poor to me that Quartz doesn't work with a "final" release of Jboss, as surely a scheduler is a common and required feature of a fully-fledged application server?! </p>
  
  <p>Any suggestions or examples I could follow to get it working?</p>
  
  <hr>
  
  <p>UPDATE August 28th 2011:</p>
  
  <p>Could someone please help me with this issue? I'm having stability issues and numerous bugs with JBoss 6.0, and contemplating switching to GlassFish 3.1 if Jboss continues to be a challenging endevour. Is it just me or is Jboss just full of bugs and issues?!</p>