<?xml version="1.0" encoding="UTF-8"?>

<deployment xmlns="urn:jboss:bean-deployer:2.0">

  <classloader><inject bean="torquebox-bootstrap:0.0.0"/></classloader>

  <bean name="JobsYamlParsingDeployer"     class="org.torquebox.jobs.deployers.JobsYamlParsingDeployer"/>
  
  <bean name="RubySchedulerDeployer" class="org.torquebox.jobs.deployers.RubySchedulerDeployer">
      <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
  </bean>
  
  <bean name="RubyJobDeployer"             class="org.torquebox.jobs.deployers.RubyJobDeployer">
    <property name="injectionAnalyzer"><inject bean="RubyInjectionAnalyzer"/></property>
  </bean>
  
  <bean name="JobsRuntimePoolDeployer"     class="org.torquebox.jobs.deployers.JobsRuntimePoolDeployer"/>
  
  <bean name="JobsLoadPathConfigurator" class="org.torquebox.interp.deployers.LoadPathDeployer">
    <property name="loadPaths">
      <list elementClass="java.lang.String">
        <value>app/jobs</value>
      </list>
    </property>
  </bean>

</deployment>

<?xml version="1.0" encoding="UTF-8"?>

<deployment xmlns="urn:jboss:bean-deployer:2.0">

  <classloader><inject bean="torquebox-bootstrap:0.0.0"/></classloader>

  <bean name="JobsYamlParsingDeployer"     class="org.torquebox.jobs.deployers.JobsYamlParsingDeployer"/>
  
  <bean name="RubySchedulerDeployer" class="org.torquebox.jobs.deployers.RubySchedulerDeployer">
      <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
      <depend optional="true">WebAppClusteringDependencyDeployer</depend>
  </bean>
  
  <bean name="RubyJobDeployer"             class="org.torquebox.jobs.deployers.RubyJobDeployer">
    <property name="injectionAnalyzer"><inject bean="RubyInjectionAnalyzer"/></property>
  </bean>
  
  <bean name="JobsRuntimePoolDeployer"     class="org.torquebox.jobs.deployers.JobsRuntimePoolDeployer"/>
  
  <bean name="JobsLoadPathConfigurator" class="org.torquebox.interp.deployers.LoadPathDeployer">
    <property name="loadPaths">
      <list elementClass="java.lang.String">
        <value>app/jobs</value>
      </list>
    </property>
  </bean>

</deployment>

Add an optional dependency on WebAppClusteringDependencyDeployer to see if we can use that to determine if we are running in a clustered profile
Add an optional dependency on WebAppClusteringDependencyDeployer to see if we can use that to determine if we are running in a clustered profile
