[jboss-svn-commits] JBL Code SVN: r34126 - in labs/jbossesb/trunk/product/services/jbpm/src/main: java/org/jboss/soa/esb/services/jbpm/integration/msg and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jul 23 01:33:47 EDT 2010


Author: kevin.conner at jboss.com
Date: 2010-07-23 01:33:47 -0400 (Fri, 23 Jul 2010)
New Revision: 34126

Added:
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/JmsScheduledDeliveryStrategy.java
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/HornetQScheduledDeliveryStrategy.java
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/JBossMessagingScheduledDeliveryStrategy.java
   labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/
   labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/hornetq-jms.xml.config
   labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/jbpm-service.xml.config
   labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/jbpm.cfg.xml.config
Modified:
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java
Log:
Support hornetq scheduling: JBESB-3334

Modified: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java	2010-07-23 05:18:41 UTC (rev 34125)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/AbstractJmsJobService.java	2010-07-23 05:33:47 UTC (rev 34126)
@@ -37,7 +37,6 @@
 import org.jbpm.JbpmException;
 import org.jbpm.db.JobSession;
 import org.jbpm.job.Job;
-import org.jbpm.job.Timer;
 
 /**
  * Abstract JMS service code based on the jBPM implementations.
@@ -51,11 +50,6 @@
     private static final long serialVersionUID = 8511949684016059912L;
 
     /**
-     * Name of the JBoss Messaging property which drives scheduled delivery.
-     */
-    private static final String JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME = "JMS_JBOSS_SCHEDULED_DELIVERY" ;
-    
-    /**
      * The logger for this class.
      */
     protected final Logger log = Logger.getLogger(getClass()) ;
@@ -104,29 +98,14 @@
         this.destination = destination;
         this.isCommitEnabled = isCommitEnabled;
       }
-
-    /**
-     * Send the timer to the job executor.
-     * @param timer The timer to send.
-     */
-    protected void sendTimer(final Timer timer) {
-        send(timer, true) ;
-    }
     
     /**
      * Send the job to the job executor.
      * @param job The job to send.
+     * @param scheduledDeliveryStrategy The scheduled delivery strategy, if a timer.
      */
-    protected void sendJob(final Job job) {
-        send(job, false) ;
-    }
-    
-    /**
-     * Send the job to the job executor.
-     * @param job The job to send.
-     * @param timer true if a timer, false if a job.
-     */
-    private void send(final Job job, final boolean timer) {
+    protected void send(final Job job, final JmsScheduledDeliveryStrategy scheduledDeliveryStrategy) {
+        final boolean timer = (scheduledDeliveryStrategy != null);
         final String type = timer ? " timer " : " job " ;
         if (log.isDebugEnabled()) {
             log.debug("Sending" + type + job.getId()) ;
@@ -147,7 +126,7 @@
             }
             if (timer) {
                 message.setLongProperty("timerId", job.getId());
-                message.setLongProperty(JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME, job.getDueDate().getTime()) ;
+                scheduledDeliveryStrategy.initialiseScheduledDelivery(message, job.getDueDate().getTime()) ;
             } else {
                 message.setLongProperty("jobId", job.getId());
             }

Added: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/JmsScheduledDeliveryStrategy.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/JmsScheduledDeliveryStrategy.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/JmsScheduledDeliveryStrategy.java	2010-07-23 05:33:47 UTC (rev 34126)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+package org.jboss.soa.esb.services.jbpm.integration;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+
+
+/**
+ * Strategy class for JMS scheduled deliveries.
+ */
+public interface JmsScheduledDeliveryStrategy
+{
+    /**
+     * Initialise the scheduled delivery properties on the JMS message.
+     * @param message The JMS message representing the scheduled job.
+     * @param time The time when the JMS message should be delivered.
+     * @throws JMSException for errors initialising the scheduled delivery.
+     */
+    public void initialiseScheduledDelivery(final Message message, final long time)
+        throws JMSException ;
+}


Property changes on: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/JmsScheduledDeliveryStrategy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java	2010-07-23 05:18:41 UTC (rev 34125)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/msg/JmsMessageService.java	2010-07-23 05:33:47 UTC (rev 34126)
@@ -68,6 +68,6 @@
      * @param job The job to send.
      */
     public void send(Job job) {
-        sendJob(job) ;
+        send(job, null) ;
     }
 }

Added: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/HornetQScheduledDeliveryStrategy.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/HornetQScheduledDeliveryStrategy.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/HornetQScheduledDeliveryStrategy.java	2010-07-23 05:33:47 UTC (rev 34126)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+package org.jboss.soa.esb.services.jbpm.integration.scheduled;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+
+import org.jboss.soa.esb.services.jbpm.integration.JmsScheduledDeliveryStrategy;
+
+
+/**
+ * Strategy class for JMS scheduled deliveries.
+ */
+public class HornetQScheduledDeliveryStrategy implements JmsScheduledDeliveryStrategy
+{
+    /**
+     * Name of the HornetQ property which drives scheduled delivery.
+     */
+    private static final String HQ_SCHED_DELIVERY_PROP_NAME = "_HQ_SCHED_DELIVERY" ;
+    
+    /**
+     * Initialise the scheduled delivery properties on the JMS message.
+     * @param message The JMS message representing the scheduled job.
+     * @param time The time when the JMS message should be delivered.
+     * @throws JMSException for errors initialising the scheduled delivery.
+     */
+    public void initialiseScheduledDelivery(final Message message, final long time)
+        throws JMSException
+    {
+        message.setLongProperty(HQ_SCHED_DELIVERY_PROP_NAME, time) ;
+    }
+}


Property changes on: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/HornetQScheduledDeliveryStrategy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/JBossMessagingScheduledDeliveryStrategy.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/JBossMessagingScheduledDeliveryStrategy.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/JBossMessagingScheduledDeliveryStrategy.java	2010-07-23 05:33:47 UTC (rev 34126)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ */
+package org.jboss.soa.esb.services.jbpm.integration.scheduled;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+
+import org.jboss.soa.esb.services.jbpm.integration.JmsScheduledDeliveryStrategy;
+
+
+/**
+ * Strategy class for JMS scheduled deliveries.
+ */
+public class JBossMessagingScheduledDeliveryStrategy implements JmsScheduledDeliveryStrategy
+{
+    /**
+     * Name of the JBoss Messaging property which drives scheduled delivery.
+     */
+    private static final String JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME = "JMS_JBOSS_SCHEDULED_DELIVERY" ;
+    
+    /**
+     * Initialise the scheduled delivery properties on the JMS message.
+     * @param message The JMS message representing the scheduled job.
+     * @param time The time when the JMS message should be delivered.
+     * @throws JMSException for errors initialising the scheduled delivery.
+     */
+    public void initialiseScheduledDelivery(final Message message, final long time)
+        throws JMSException
+    {
+        message.setLongProperty(JMS_JBOSS_SCHEDULED_DELIVERY_PROP_NAME, time) ;
+    }
+}


Property changes on: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/scheduled/JBossMessagingScheduledDeliveryStrategy.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java	2010-07-23 05:18:41 UTC (rev 34125)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerService.java	2010-07-23 05:33:47 UTC (rev 34126)
@@ -5,6 +5,7 @@
 import javax.jms.JMSException;
 
 import org.jboss.soa.esb.services.jbpm.integration.AbstractJmsJobService;
+import org.jboss.soa.esb.services.jbpm.integration.JmsScheduledDeliveryStrategy;
 import org.jbpm.JbpmContext;
 import org.jbpm.graph.exe.ProcessInstance;
 import org.jbpm.graph.exe.Token;
@@ -22,6 +23,11 @@
      * Serial Version UID for this class.
      */
     private static final long serialVersionUID = -8830533950742335914L;
+    
+    /**
+     * The scheduled delivery strategy.
+     */
+    private final JmsScheduledDeliveryStrategy scheduledDeliveryStrategy ;
 
     /**
      * Create the JMS scheduler service.
@@ -32,10 +38,11 @@
      * @throws JMSException For errors in constructing the JMS session.
      */
     public JmsSchedulerService(final JbpmContext jbpmContext, final ConnectionFactory connectionFactory,
-        final Destination destination, boolean isCommitEnabled)
+        final Destination destination, boolean isCommitEnabled, JmsScheduledDeliveryStrategy scheduledDeliveryStrategy)
         throws JMSException
     {
         super(jbpmContext, connectionFactory, destination, isCommitEnabled) ;
+        this.scheduledDeliveryStrategy = scheduledDeliveryStrategy ;
     }
     
     /**
@@ -44,7 +51,7 @@
      */
     public void createTimer(final Timer timer)
     {
-        sendTimer(timer) ;
+        send(timer, scheduledDeliveryStrategy) ;
     }
 
     /**

Modified: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java	2010-07-23 05:18:41 UTC (rev 34125)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/integration/timer/JmsSchedulerServiceFactory.java	2010-07-23 05:33:47 UTC (rev 34126)
@@ -26,6 +26,8 @@
 import javax.naming.NamingException;
 
 import org.jboss.soa.esb.services.jbpm.integration.AbstractJmsServiceFactory;
+import org.jboss.soa.esb.services.jbpm.integration.JmsScheduledDeliveryStrategy;
+import org.jboss.soa.esb.services.jbpm.integration.scheduled.JBossMessagingScheduledDeliveryStrategy;
 import org.jbpm.JbpmConfiguration;
 import org.jbpm.JbpmException;
 import org.jbpm.svc.Service;
@@ -58,6 +60,10 @@
      * The JMS destination for the scheduler.
      */
     private Destination destination;
+    /**
+     * The scheduled delivery implementation.
+     */
+    private JmsScheduledDeliveryStrategy scheduledDeliveryStrategy = new JBossMessagingScheduledDeliveryStrategy();
 
     /**
      * Get the JMS destination associated with this scheduler.
@@ -87,7 +93,7 @@
       try
       {
         return new JmsSchedulerService(JbpmConfiguration.getInstance().getCurrentJbpmContext(),
-            getConnectionFactory(), getDestination(), isCommitEnabled());
+            getConnectionFactory(), getDestination(), isCommitEnabled(), scheduledDeliveryStrategy);
       }
       catch (JMSException e)
       {
@@ -103,4 +109,13 @@
       super.close() ;
       destination = null;
     }
+    
+    /**
+     * Set the scheduled delivery strategy.
+     * @param scheduledDeliveryStrategy The scheduled delivery strategy.
+     */
+    public void setScheduledDeliveryStrategy(final JmsScheduledDeliveryStrategy scheduledDeliveryStrategy)
+    {
+        this.scheduledDeliveryStrategy = (scheduledDeliveryStrategy == null ? new JBossMessagingScheduledDeliveryStrategy() : scheduledDeliveryStrategy) ;
+    }
 }

Added: labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/hornetq-jms.xml.config
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/hornetq-jms.xml.config	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/hornetq-jms.xml.config	2010-07-23 05:33:47 UTC (rev 34126)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration xmlns="urn:hornetq"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+    <queue name="CallbackQueue">
+        <entry name="queue/CallbackQueue"/>
+    </queue>
+
+    <!-- JMS message service -->
+    <queue name="JbpmJobQueue">
+        <entry name="queue/JbpmJobQueue"/>
+    </queue>
+    <queue name="JbpmCommandQueue">
+        <entry name="queue/JbpmCommandQueue"/>
+    </queue>
+    <queue name="JbpmDLQ">
+        <entry name="queue/JbpmDLQ"/>
+    </queue>
+    <!-- End of JMS message service -->
+    <!-- JMS scheduler service -->
+    <queue name="JbpmTimerQueue">
+        <entry name="queue/JbpmTimerQueue"/>
+    </queue>
+    <!-- End of JMS scheduler service -->
+</configuration>

Added: labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/jbpm-service.xml.config
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/jbpm-service.xml.config	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/jbpm-service.xml.config	2010-07-23 05:33:47 UTC (rev 34126)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+   <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
+       name="jboss.esb:service=JBPMDatabaseInitializer">
+      <attribute name="Datasource">java:/JbpmDS</attribute>
+      <attribute name="ExistsSql">select count(*) from JBPM_ID_USER</attribute>
+      <attribute name="SqlFiles">
+      jbpm-sql/jbpm.jpdl.hsqldb.sql,
+      jbpm-sql/import.sql
+      </attribute>
+      <depends>jboss.jca:service=DataSourceBinding,name=JbpmDS</depends>
+      <attribute name="UseEOL">true</attribute>
+   </mbean>
+
+   <mbean code="org.jboss.soa.esb.services.jbpm.configuration.JbpmService"
+      name="jboss.esb:service=JbpmService">
+      <depends>jboss.esb:service=JBPMDatabaseInitializer</depends>
+      <!-- JMS message service -->
+      <depends>org.hornetq:module=JMS,type=Queue,name="JbpmJobQueue"</depends>
+      <depends>org.hornetq:module=JMS,type=Queue,name="JbpmCommandQueue"</depends>
+      <depends>org.hornetq:module=JMS,type=Queue,name="JbpmDLQ"</depends>
+      <!-- End of JMS message service -->
+      <!-- JMS scheduler service -->
+      <depends>org.hornetq:module=JMS,type=Queue,name="JbpmTimerQueue"</depends>
+      <!-- End of JMS scheduler service -->
+   </mbean>
+
+   <!-- JMS message service -->
+   <mbean code="org.jboss.internal.soa.esb.dependencies.JCAInflowAdapter"
+      name="jboss.esb:service=JBPMJobExecutor">
+      <attribute name="BeanType">org.jboss.soa.esb.services.jbpm.integration.command.JobListener</attribute>
+      <attribute name="Adapter">jms-ra.rar</attribute>
+      <attribute name="ActivationSpec">
+      destination=queue/JbpmJobQueue
+      destinationType=javax.xml.Queue
+      </attribute>
+      <!-- optional attributes -->
+      <attribute name="MessagingInterface">javax.jms.MessageListener</attribute>
+      <attribute name="IsTransacted">true</attribute>
+      <attribute name="ActivationBridge">org.jboss.soa.esb.listeners.jca.JBoss42ActivationBridge</attribute>
+      <attribute name="Description">jBPM Job Listener inflow</attribute>
+      <depends>org.hornetq:module=JMS,type=Queue,name="JbpmJobQueue"</depends>
+   </mbean>
+
+   <mbean code="org.jboss.internal.soa.esb.dependencies.JCAInflowAdapter"
+      name="jboss.esb:service=JBPMCommandExecutor">
+      <attribute name="BeanType">org.jboss.soa.esb.services.jbpm.integration.command.CommandListener</attribute>
+      <attribute name="Adapter">jms-ra.rar</attribute>
+      <attribute name="ActivationSpec">
+      destination=queue/JbpmCommandQueue
+      destinationType=javax.xml.Queue
+      </attribute>
+      <!-- optional attributes -->
+      <attribute name="MessagingInterface">javax.jms.MessageListener</attribute>
+      <attribute name="IsTransacted">true</attribute>
+      <attribute name="ActivationBridge">org.jboss.soa.esb.listeners.jca.JBoss42ActivationBridge</attribute>
+      <attribute name="Description">jBPM Command Listener inflow</attribute>
+      <depends>org.hornetq:module=JMS,type=Queue,name="JbpmCommandQueue"</depends>
+   </mbean>
+   <!-- End of JMS message service -->
+   <!-- JMS scheduler service -->
+   <mbean code="org.jboss.internal.soa.esb.dependencies.JCAInflowAdapter"
+      name="jboss.esb:service=JBPMTimerExecutor">
+      <attribute name="BeanType">org.jboss.soa.esb.services.jbpm.integration.command.JobListener</attribute>
+      <attribute name="Adapter">jms-ra.rar</attribute>
+      <attribute name="ActivationSpec">
+      destination=queue/JbpmTimerQueue
+      destinationType=javax.xml.Queue
+      </attribute>
+      <!-- optional attributes -->
+      <attribute name="MessagingInterface">javax.jms.MessageListener</attribute>
+      <attribute name="IsTransacted">true</attribute>
+      <attribute name="ActivationBridge">org.jboss.soa.esb.listeners.jca.JBoss42ActivationBridge</attribute>
+      <attribute name="Description">jBPM Timer Listener inflow</attribute>
+      <depends>org.hornetq:module=JMS,type=Queue,name="JbpmTimerQueue"</depends>
+   </mbean>
+   <!-- End of JMS scheduler service -->
+</server>

Added: labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/jbpm.cfg.xml.config
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/jbpm.cfg.xml.config	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/resources/config/hornetqscheduler/jbpm.cfg.xml.config	2010-07-23 05:33:47 UTC (rev 34126)
@@ -0,0 +1,65 @@
+<jbpm-configuration>
+
+  <!-- 
+    This configuration is used when there is no jbpm.cfg.xml file found in the 
+    root of the classpath.  It is a very basic configuration without persistence
+    and message services.  Only the authorization service installed.
+    You can parse and create processes, but when you try to use one of the 
+    unavailable services, you'll get an exception.
+  -->
+  
+  <jbpm-context>
+    <service name="persistence">
+      <factory>
+        <bean class="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory">
+          <property name="isTransactionEnabled"><false/></property>
+          <property name="isCurrentSessionEnabled"><true/></property>
+          <!--property name="sessionFactoryJndiName">
+            <string value="java:/myHibSessFactJndiName" />
+          </property-->
+        </bean>
+     </factory>
+     </service>
+    <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
+    <!-- JMS message service -->
+    <service name="message" factory="org.jboss.soa.esb.services.jbpm.integration.msg.JmsMessageServiceFactory" />
+    <!-- End of JMS message service -->
+    <!-- JMS scheduler -->
+    <service name="scheduler">
+      <factory>
+        <bean class="org.jboss.soa.esb.services.jbpm.integration.timer.JmsSchedulerServiceFactory">
+          <property name="scheduledDeliveryStrategy">
+            <bean class="org.jboss.soa.esb.services.jbpm.integration.scheduled.HornetQScheduledDeliveryStrategy"/>
+          </property>
+        </bean>
+      </factory>
+    </service>
+    <!-- End of JMS scheduler -->
+    <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
+    <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
+  </jbpm-context>
+
+  <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
+  <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
+
+  <!-- configuration resource files pointing to default configuration files in jbpm-{version}.jar -->
+  <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
+  <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
+  <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
+  <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
+  <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
+  <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
+  <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
+  <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
+
+  <int    name="jbpm.byte.block.size" value="1024" singleton="true" />
+  <bean   name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
+  <bean   name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
+  <string name="jbpm.mail.smtp.host" value="localhost" />
+  <bean   name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
+  <string name="jbpm.mail.from.address" value="jbpm at noreply" />
+  
+  <!-- JMS message service plus JMS/quartz scheduler service -->
+  <null name="jbpm.job.executor"/> 
+  <!-- End of JMS message service plus JMS/quartz scheduler service -->
+</jbpm-configuration>



More information about the jboss-svn-commits mailing list