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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Oct 19 13:31:57 EDT 2007


Author: kevin.conner at jboss.com
Date: 2007-10-19 13:31:57 -0400 (Fri, 19 Oct 2007)
New Revision: 15951

Added:
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/configuration/
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/configuration/JbpmService.java
   labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/configuration/JbpmServiceMBean.java
Removed:
   labs/jbossesb/trunk/product/services/jbpm/m2/
Modified:
   labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-service.xml
Log:
Added MBean to close down default job executor: JBESB-1131

Added: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/configuration/JbpmService.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/configuration/JbpmService.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/configuration/JbpmService.java	2007-10-19 17:31:57 UTC (rev 15951)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.configuration;
+
+import org.jboss.system.ServiceMBeanSupport;
+import org.jbpm.JbpmConfiguration;
+
+/**
+ * MBean controlling the jBPM service initialisation.
+ * 
+ * It's only purpose at present is to control the lifecycle of the default
+ * jBPM job executor.
+ * 
+ * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
+ */
+public class JbpmService extends ServiceMBeanSupport implements JbpmServiceMBean
+{
+    @Override
+    protected void startService()
+        throws Exception
+    {
+        final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance() ;
+        jbpmConfiguration.getJobExecutor().start() ;
+        super.startService();
+    }
+
+    @Override
+    protected void stopService()
+        throws Exception
+    {
+        super.stopService();
+        final JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance() ;
+        jbpmConfiguration.getJobExecutor().stopAndJoin() ;
+    }
+}


Property changes on: labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/configuration/JbpmService.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/configuration/JbpmServiceMBean.java
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/configuration/JbpmServiceMBean.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/configuration/JbpmServiceMBean.java	2007-10-19 17:31:57 UTC (rev 15951)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.services.jbpm.configuration;
+
+import org.jboss.system.ServiceMBean;
+
+/**
+ * Interface for jBPM service initialisation MBean.
+ * 
+ * @author <a href="mailto:kevin.conner at jboss.com">Kevin Conner</a>
+ */
+public interface JbpmServiceMBean extends ServiceMBean
+{
+}


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

Modified: labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-service.xml
===================================================================
--- labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-service.xml	2007-10-19 16:44:56 UTC (rev 15950)
+++ labs/jbossesb/trunk/product/services/jbpm/src/main/resources/jbpm-service.xml	2007-10-19 17:31:57 UTC (rev 15951)
@@ -13,4 +13,8 @@
       </attribute>
       <depends>jboss.jca:service=DataSourceBinding,name=JbpmDS</depends>
     </mbean>
+
+   <mbean code="org.jboss.soa.esb.services.jbpm.configuration.JbpmService"
+      name="jboss.esb:service=JbpmService">
+   </mbean>
 </server>




More information about the jboss-svn-commits mailing list