Author: heiko.braun(a)jboss.com
Date: 2009-02-13 03:44:18 -0500 (Fri, 13 Feb 2009)
New Revision: 3863
Added:
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/KernelAwareSPIFactory.java
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/KernelLocator.java
Removed:
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/KernelAwareSPIFactory.java
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/KernelLocator.java
Modified:
jbpm4/branches/hbraun/modules/integration/jboss5/pom.xml
jbpm4/branches/hbraun/modules/integration/jboss5/scripts/assembly-config.xml
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml
jbpm4/branches/hbraun/modules/integration/spi/pom.xml
Log:
Move kernel locator to spi package
Modified: jbpm4/branches/hbraun/modules/integration/jboss5/pom.xml
===================================================================
--- jbpm4/branches/hbraun/modules/integration/jboss5/pom.xml 2009-02-13 08:22:49 UTC (rev
3862)
+++ jbpm4/branches/hbraun/modules/integration/jboss5/pom.xml 2009-02-13 08:44:18 UTC (rev
3863)
@@ -36,7 +36,7 @@
<!-- Build -->
<build>
<plugins>
- <!--plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
@@ -53,12 +53,13 @@
</configuration>
</execution>
</executions>
- </plugin-->
+ </plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>META-INF/jbpm-service-jboss-beans.xml</exclude>
+ <exclude>META-INF/jbpm-deployers-jboss-beans.xml</exclude>
</excludes>
</configuration>
</plugin>
Modified: jbpm4/branches/hbraun/modules/integration/jboss5/scripts/assembly-config.xml
===================================================================
---
jbpm4/branches/hbraun/modules/integration/jboss5/scripts/assembly-config.xml 2009-02-13
08:22:49 UTC (rev 3862)
+++
jbpm4/branches/hbraun/modules/integration/jboss5/scripts/assembly-config.xml 2009-02-13
08:44:18 UTC (rev 3863)
@@ -10,7 +10,7 @@
<directory>${project.build.outputDirectory}</directory>
<outputDirectory>/</outputDirectory>
<includes>
- <include>*beans.xml</include>
+ <include>**/*beans.xml</include>
</includes>
</fileSet>
</fileSets>
Modified:
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java
===================================================================
---
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java 2009-02-13
08:22:49 UTC (rev 3862)
+++
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/JBPMDeployer.java 2009-02-13
08:44:18 UTC (rev 3863)
@@ -27,6 +27,7 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jbpm.integration.spi.JBPMService;
+import org.jbpm.integration.util.KernelAwareSPIFactory;
/**
* Deploys JBPM processes and associates a classloader.
Deleted:
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/KernelAwareSPIFactory.java
===================================================================
---
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/KernelAwareSPIFactory.java 2009-02-13
08:22:49 UTC (rev 3862)
+++
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/KernelAwareSPIFactory.java 2009-02-13
08:44:18 UTC (rev 3863)
@@ -1,42 +0,0 @@
-/*
- * 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.jboss5;
-
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.kernel.spi.dependency.KernelController;
-
-/**
- * SPI factory delegating to kernel for bean lookups
- *
- * @author richard.opalka(a)jboss.com
- * @author Heiko.Braun(a)jboss.com
- */
-public class KernelAwareSPIFactory
-{
- @SuppressWarnings("unchecked")
- public <T> T getKernelProvidedSPI(String beanName, Class<T> spiArtifact)
- {
- KernelController controller = KernelLocator.getKernel().getController();
- ControllerContext ctx = controller.getInstalledContext(beanName);
- return (T)ctx.getTarget();
- }
-}
\ No newline at end of file
Deleted:
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/KernelLocator.java
===================================================================
---
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/KernelLocator.java 2009-02-13
08:22:49 UTC (rev 3862)
+++
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/KernelLocator.java 2009-02-13
08:44:18 UTC (rev 3863)
@@ -1,47 +0,0 @@
-/*
- * 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.jboss5;
-
-//$Id$
-
-import org.jboss.kernel.Kernel;
-
-/**
- * Locate the single instance of the kernel
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-May-2006
- */
-public class KernelLocator
-{
- private static Kernel kernel;
-
- public static Kernel getKernel()
- {
- return KernelLocator.kernel;
- }
-
- public void setKernel(Kernel kernel)
- {
- KernelLocator.kernel = kernel;
- }
-}
Modified:
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml
===================================================================
---
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml 2009-02-13
08:22:49 UTC (rev 3862)
+++
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/resources/META-INF/jbpm-deployers-jboss-beans.xml 2009-02-13
08:44:18 UTC (rev 3863)
@@ -5,7 +5,7 @@
<!--
Locate the single instance of the kernel
-->
- <bean name="org.jbpm:service=KernelLocator"
class="org.jbpm.integration.jboss5.KernelLocator">
+ <bean name="org.jbpm:service=KernelLocator"
class="org.jbpm.integration.util.KernelLocator">
<property name="kernel"><inject
bean="jboss.kernel:service=Kernel" /></property>
</bean>
Modified: jbpm4/branches/hbraun/modules/integration/spi/pom.xml
===================================================================
--- jbpm4/branches/hbraun/modules/integration/spi/pom.xml 2009-02-13 08:22:49 UTC (rev
3862)
+++ jbpm4/branches/hbraun/modules/integration/spi/pom.xml 2009-02-13 08:44:18 UTC (rev
3863)
@@ -25,6 +25,11 @@
<groupId>org.jbpm.jbpm4</groupId>
<artifactId>jbpm-jpdl</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-system-jmx</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<!-- Build -->
Copied:
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/KernelAwareSPIFactory.java
(from rev 3862,
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/KernelAwareSPIFactory.java)
===================================================================
---
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/KernelAwareSPIFactory.java
(rev 0)
+++
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/KernelAwareSPIFactory.java 2009-02-13
08:44:18 UTC (rev 3863)
@@ -0,0 +1,42 @@
+/*
+ * 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 org.jboss.dependency.spi.ControllerContext;
+import org.jboss.kernel.spi.dependency.KernelController;
+
+/**
+ * SPI factory delegating to kernel for bean lookups
+ *
+ * @author richard.opalka(a)jboss.com
+ * @author Heiko.Braun(a)jboss.com
+ */
+public class KernelAwareSPIFactory
+{
+ @SuppressWarnings("unchecked")
+ public <T> T getKernelProvidedSPI(String beanName, Class<T> spiArtifact)
+ {
+ KernelController controller = KernelLocator.getKernel().getController();
+ ControllerContext ctx = controller.getInstalledContext(beanName);
+ return (T)ctx.getTarget();
+ }
+}
\ No newline at end of file
Copied:
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/KernelLocator.java
(from rev 3862,
jbpm4/branches/hbraun/modules/integration/jboss5/src/main/java/org/jbpm/integration/jboss5/KernelLocator.java)
===================================================================
---
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/KernelLocator.java
(rev 0)
+++
jbpm4/branches/hbraun/modules/integration/spi/src/main/java/org/jbpm/integration/util/KernelLocator.java 2009-02-13
08:44:18 UTC (rev 3863)
@@ -0,0 +1,47 @@
+/*
+ * 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;
+
+//$Id$
+
+import org.jboss.kernel.Kernel;
+
+/**
+ * Locate the single instance of the kernel
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class KernelLocator
+{
+ private static Kernel kernel;
+
+ public static Kernel getKernel()
+ {
+ return KernelLocator.kernel;
+ }
+
+ public void setKernel(Kernel kernel)
+ {
+ KernelLocator.kernel = kernel;
+ }
+}