[jbpm-commits] JBoss JBPM SVN: r4219 - in jbpm4/branches/hbraun/modules/integration: spi/src/main/java/org/jbpm/integration/util and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Mar 10 13:53:32 EDT 2009
Author: heiko.braun at jboss.com
Date: 2009-03-10 13:53:32 -0400 (Tue, 10 Mar 2009)
New Revision: 4219
Added:
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java
Modified:
jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java
Log:
Set JBPMDeployer.relativeOrder=1000. This way it will kick in after the other deployers
Modified: jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java 2009-03-10 16:09:53 UTC (rev 4218)
+++ jbpm4/branches/hbraun/modules/integration/jboss4/src/main/java/org/jbpm/integration/jboss4/JBPMDeployer.java 2009-03-10 17:53:32 UTC (rev 4219)
@@ -76,7 +76,7 @@
protected void initializeMainDeployer()
{
setSuffixes(new String[]{ARCHIVE_SUFFIX, JPDL_FILE_SUFFIX});
- setRelativeOrder(-1);
+ setRelativeOrder(1000); // Make sure it kicks in after the other deployers
}
/**
Added: jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java
===================================================================
--- jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java (rev 0)
+++ jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/MBeanServerLocator.java 2009-03-10 17:53:32 UTC (rev 4219)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jbpm.integration.util;
+
+import java.util.Iterator;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+
+/**
+ * Locate the single instance of the MBeanServer
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 30-Jul-2007
+ */
+public class MBeanServerLocator
+{
+ private MBeanServer mbeanServer;
+
+ public MBeanServer getMbeanServer()
+ {
+ // In jboss-4.2 the MBeanServer cannot be injected
+ if (mbeanServer == null)
+ {
+ for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator(); i.hasNext();)
+ {
+ mbeanServer = (MBeanServer)i.next();
+ break;
+ }
+ }
+ return mbeanServer;
+ }
+
+ public void setMbeanServer(MBeanServer mbeanServer)
+ {
+ this.mbeanServer = mbeanServer;
+ }
+}
More information about the jbpm-commits
mailing list