servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r580072 - in /incubator/servicemix/trunk/platforms/geronimo: ./ deployer-service/ deployer-service/src/main/java/org/apache/servicemix/geronimo/ deployer/ deployer/src/plan/ servicemix-service/ servicemix-service/src/main/java/org/apache/se...
Date Thu, 27 Sep 2007 16:03:57 GMT
Author: gnodet
Date: Thu Sep 27 09:03:53 2007
New Revision: 580072

URL: http://svn.apache.org/viewvc?rev=580072&view=rev
Log:
SM-1037: Geronimo Plugin enhancement and bug fix

Modified:
    incubator/servicemix/trunk/platforms/geronimo/deployer-service/pom.xml
    incubator/servicemix/trunk/platforms/geronimo/deployer-service/src/main/java/org/apache/servicemix/geronimo/ServiceMixConfigBuilder.java
    incubator/servicemix/trunk/platforms/geronimo/deployer/pom.xml
    incubator/servicemix/trunk/platforms/geronimo/deployer/src/plan/geronimo-service.xml
    incubator/servicemix/trunk/platforms/geronimo/geronimo-plugins.xml
    incubator/servicemix/trunk/platforms/geronimo/pom.xml
    incubator/servicemix/trunk/platforms/geronimo/servicemix-service/pom.xml
    incubator/servicemix/trunk/platforms/geronimo/servicemix-service/src/main/java/org/apache/servicemix/geronimo/ServiceMixGBean.java
    incubator/servicemix/trunk/platforms/geronimo/servicemix/pom.xml
    incubator/servicemix/trunk/platforms/geronimo/servicemix/src/plan/geronimo-service.xml

Modified: incubator/servicemix/trunk/platforms/geronimo/deployer-service/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/platforms/geronimo/deployer-service/pom.xml?rev=580072&r1=580071&r2=580072&view=diff
==============================================================================
--- incubator/servicemix/trunk/platforms/geronimo/deployer-service/pom.xml (original)
+++ incubator/servicemix/trunk/platforms/geronimo/deployer-service/pom.xml Thu Sep 27 09:03:53
2007
@@ -34,38 +34,29 @@
         <dependency>
             <groupId>org.apache.servicemix.geronimo</groupId>
             <artifactId>servicemix-service</artifactId>
-            <version>3.2-SNAPSHOT</version>
+            <version>${version}</version>
             <type>jar</type>
         </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-kernel</artifactId>
-            <version>${geronimo-version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-deployment</artifactId>
-            <version>${geronimo-version}</version>
-        </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-service-builder</artifactId>
-            <version>${geronimo-version}</version>
+            <groupId>org.apache.servicemix</groupId>
+			<artifactId>servicemix-core</artifactId>
+            <version>${version}</version>
+            <type>jar</type>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-common</artifactId>
-            <version>${geronimo-version}</version>
+            <groupId>org.apache.servicemix</groupId>
+			<artifactId>servicemix-jbi</artifactId>
+            <version>${version}</version>
+            <type>jar</type>
         </dependency>
-
+        
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-j2ee</artifactId>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>j2ee-deployer</artifactId>
             <version>${geronimo-version}</version>
+            <type>car</type>
         </dependency>
 
     </dependencies>

Modified: incubator/servicemix/trunk/platforms/geronimo/deployer-service/src/main/java/org/apache/servicemix/geronimo/ServiceMixConfigBuilder.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/platforms/geronimo/deployer-service/src/main/java/org/apache/servicemix/geronimo/ServiceMixConfigBuilder.java?rev=580072&r1=580071&r2=580072&view=diff
==============================================================================
--- incubator/servicemix/trunk/platforms/geronimo/deployer-service/src/main/java/org/apache/servicemix/geronimo/ServiceMixConfigBuilder.java
(original)
+++ incubator/servicemix/trunk/platforms/geronimo/deployer-service/src/main/java/org/apache/servicemix/geronimo/ServiceMixConfigBuilder.java
Thu Sep 27 09:03:53 2007
@@ -29,6 +29,8 @@
 import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 
+import javax.jbi.component.Component;
+import javax.jbi.component.ServiceUnitManager;
 import javax.management.MalformedObjectNameException;
 
 import org.apache.commons.logging.Log;
@@ -45,6 +47,7 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
@@ -55,7 +58,6 @@
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.ImportType;
 import org.apache.geronimo.kernel.repository.Repository;
-import org.apache.geronimo.kernel.repository.Version;
 import org.apache.servicemix.jbi.deployment.Descriptor;
 import org.apache.servicemix.jbi.deployment.DescriptorFactory;
 import org.apache.servicemix.jbi.deployment.ServiceUnit;
@@ -69,6 +71,8 @@
 
     private final Collection repositories;
 
+    private final AbstractNameQuery containerName;
+
     private final Kernel kernel;
 
     public static final GBeanInfo GBEAN_INFO;
@@ -78,8 +82,9 @@
         infoFactory.addInterface(ConfigurationBuilder.class);
         infoFactory.addAttribute("defaultEnvironment", Environment.class, true, true);
         infoFactory.addAttribute("kernel", Kernel.class, false);
+        infoFactory.addAttribute("containerName", AbstractNameQuery.class, true, true);
         infoFactory.addReference("Repositories", Repository.class, "Repository");
-        infoFactory.setConstructor(new String[] { "defaultEnvironment", "Repositories", "kernel"
});
+        infoFactory.setConstructor(new String[] { "defaultEnvironment", "containerName",
"Repositories", "kernel" });
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 
@@ -87,10 +92,11 @@
         return GBEAN_INFO;
     }
 
-    public ServiceMixConfigBuilder(Environment defaultEnvironment, Collection repositories,
Kernel kernel) {
+    public ServiceMixConfigBuilder(Environment defaultEnvironment, AbstractNameQuery containerName,
Collection repositories, Kernel kernel) {
         this.defaultEnvironment = defaultEnvironment;
         this.repositories = repositories;
         this.kernel = kernel;
+        this.containerName = containerName;
     }
 
     /**
@@ -109,7 +115,6 @@
     public Object getDeploymentPlan(File planFile, JarFile module, ModuleIDBuilder idBuilder)
                     throws DeploymentException {
         log.debug("Checking for ServiceMix deployment.");
-        System.err.println("Checking for ServiceMix deployment.");
         if (module == null) {
             return null;
         }
@@ -264,12 +269,12 @@
         props.put("jbiType", "JBIComponent");
         props.put("name", descriptor.getComponent().getIdentification().getName());
         AbstractName name = new AbstractName(environment.getConfigId(), props);
-        GBeanData gbeanData = new GBeanData(name, Component.GBEAN_INFO);
+        GBeanData gbeanData = new GBeanData(name, org.apache.servicemix.geronimo.Component.GBEAN_INFO);
         gbeanData.setAttribute("name", descriptor.getComponent().getIdentification().getName());
         gbeanData.setAttribute("description", descriptor.getComponent().getIdentification().getDescription());
         gbeanData.setAttribute("type", descriptor.getComponent().getType());
         gbeanData.setAttribute("className", descriptor.getComponent().getComponentClassName());
-        gbeanData.setReferencePattern("container", getContainerObjectName());
+        gbeanData.setReferencePattern("container", containerName);
         context.addGBean(gbeanData);
     }
 
@@ -286,12 +291,23 @@
             String name = sus[i].getIdentification().getName();
             String zip = sus[i].getTarget().getArtifactsZip();
             String comp = sus[i].getTarget().getComponentName();
-            unzip(context, new JarFile(new File(targetDir, zip)), new URI("sus/" + comp +
"/" + name + "/"));
-            // Deploy the SU on the component
-            // TODO: deploy
+            URI installUri = new URI("sus/" + comp + "/" + name + "/");
+            unzip(context, new JarFile(new File(targetDir, zip)), installUri);
             // Add component config as a dependency
-            Artifact sl = new Artifact("servicemix-components", comp, (Version) null, "car");
+            Artifact sl = new Artifact("servicemix-components", comp, "0.0", "car");
             environment.addDependency(sl, ImportType.ALL);
+             // Deploy the SU on the component
+             Component jbiServiceUnit = null;
+             try {
+                 jbiServiceUnit = getAssociatedJbiServiceUnit(comp, sl);
+             } catch (GBeanNotFoundException e) {
+                 throw new DeploymentException("Can not find the associated service unit
for this service assembly. "
+                         + "Check if it's deployed and started.", e);
+             }
+             ServiceUnitManager serviceUnitManager = jbiServiceUnit.getServiceUnitManager();
+             File installDir = new File(context.getBaseDir(), installUri.toString());
+             String deploy = serviceUnitManager.deploy(name, installDir.getAbsolutePath());
 
+             log.debug(deploy);
         }
         // Create the JBI deployment managed object
         Properties props = new Properties();
@@ -300,7 +316,7 @@
         AbstractName name = new AbstractName(environment.getConfigId(), props);
         GBeanData gbeanData = new GBeanData(name, ServiceAssembly.GBEAN_INFO);
         gbeanData.setAttribute("name", descriptor.getServiceAssembly().getIdentification().getName());
-        gbeanData.setReferencePattern("container", getContainerObjectName());
+        gbeanData.setReferencePattern("container", containerName);
         for (int i = 0; i < sus.length; i++) {
             String comp = sus[i].getTarget().getComponentName();
             gbeanData.addDependency(getComponentName(comp));
@@ -308,6 +324,25 @@
         context.addGBean(gbeanData);
     }
 
+    /**
+     * Returns the JBI ServiceUnit with the given 'ArtifactName' and
+     * the given componentName. 
+     * 
+     * @param compName Name
+     * @param artifactName Name
+     * @return Component instance
+     * @throws GBeanNotFoundException if the ServiceUnit cannot be found
+     */
+    private Component getAssociatedJbiServiceUnit(String compName, Artifact artifactName)
throws GBeanNotFoundException {
+        Properties props = new Properties();
+        props.put("jbiType", "JBIComponent");
+        props.put("name", compName);
+        org.apache.servicemix.geronimo.Component serviceUnit = 
+                (org.apache.servicemix.geronimo.Component) kernel.getGBean(new AbstractName(artifactName,
props));
+        Component jbiServiceUnit = serviceUnit.getComponent();
+        return jbiServiceUnit;
+    }
+
     protected void buildSharedLibrary(Descriptor descriptor, DeploymentContext context, JarFile
module)
                     throws Exception {
         Environment environment = context.getConfiguration().getEnvironment();
@@ -353,7 +388,7 @@
         GBeanData gbeanData = new GBeanData(name, SharedLibrary.GBEAN_INFO);
         gbeanData.setAttribute("name", descriptor.getSharedLibrary().getIdentification().getName());
         gbeanData.setAttribute("description", descriptor.getSharedLibrary().getIdentification().getDescription());
-        gbeanData.setReferencePattern("container", getContainerObjectName());
+        gbeanData.setReferencePattern("container", containerName);
         context.addGBean(gbeanData);
     }
 
@@ -364,12 +399,6 @@
             URI target = targetUri.resolve(entry.getName());
             context.addFile(target, module, entry);
         }
-    }
-
-    protected AbstractName getContainerObjectName() {
-        AbstractNameQuery query = new AbstractNameQuery(Container.class.getName());
-        Set names = kernel.listGBeans(query);
-        return (AbstractName) names.iterator().next();
     }
 
     protected AbstractNameQuery getComponentName(String name) throws MalformedObjectNameException
{

Modified: incubator/servicemix/trunk/platforms/geronimo/deployer/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/platforms/geronimo/deployer/pom.xml?rev=580072&r1=580071&r2=580072&view=diff
==============================================================================
--- incubator/servicemix/trunk/platforms/geronimo/deployer/pom.xml (original)
+++ incubator/servicemix/trunk/platforms/geronimo/deployer/pom.xml Thu Sep 27 09:03:53 2007
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
 
 <!--
 
@@ -39,24 +38,43 @@
             <version>3.2-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
+
         <dependency>
             <groupId>org.apache.servicemix.geronimo</groupId>
             <artifactId>deployer-service</artifactId>
             <version>${servicemix-version}</version>
             <type>jar</type>
         </dependency>
-        <dependency>
-            <groupId>org.apache.servicemix.geronimo</groupId>
-            <artifactId>servicemix</artifactId>
-            <version>${servicemix-version}</version>
-            <type>car</type>
-        </dependency>
+
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>geronimo-gbean-deployer</artifactId>
             <version>${geronimo-version}</version>
             <type>car</type>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.servicemix.geronimo</groupId>
+			<artifactId>servicemix</artifactId>
+            <version>${version}</version>
+            <type>car</type>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+			<artifactId>servicemix-core</artifactId>
+            <version>${version}</version>
+            <type>jar</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+			<artifactId>servicemix-jbi</artifactId>
+            <version>${version}</version>
+            <type>jar</type>
+        </dependency>
+
     </dependencies>
 
     <build>

Modified: incubator/servicemix/trunk/platforms/geronimo/deployer/src/plan/geronimo-service.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/platforms/geronimo/deployer/src/plan/geronimo-service.xml?rev=580072&r1=580071&r2=580072&view=diff
==============================================================================
--- incubator/servicemix/trunk/platforms/geronimo/deployer/src/plan/geronimo-service.xml (original)
+++ incubator/servicemix/trunk/platforms/geronimo/deployer/src/plan/geronimo-service.xml Thu
Sep 27 09:03:53 2007
@@ -22,6 +22,7 @@
 <module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
 
     <gbean name="ServiceMixConfigBuilder" class="org.apache.servicemix.geronimo.ServiceMixConfigBuilder">
+        <attribute name="containerName">?name=ServiceMixJBIContainer</attribute>
         <reference name="Repositories" />
         <xml-attribute name="defaultEnvironment">
             <environment>
@@ -33,6 +34,9 @@
                         <type>car</type>
                     </dependency>
                 </dependencies>
+ 				<hidden-classes>
+					<filter>org.apache.geronimo</filter>
+ 				</hidden-classes>
             </environment>
         </xml-attribute>
     </gbean>

Modified: incubator/servicemix/trunk/platforms/geronimo/geronimo-plugins.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/platforms/geronimo/geronimo-plugins.xml?rev=580072&r1=580071&r2=580072&view=diff
==============================================================================
--- incubator/servicemix/trunk/platforms/geronimo/geronimo-plugins.xml (original)
+++ incubator/servicemix/trunk/platforms/geronimo/geronimo-plugins.xml Thu Sep 27 09:03:53
2007
@@ -26,7 +26,7 @@
         <url>http://incubator.apache.org/servicemix</url>
         <author>The ServiceMix development team</author>
         <license osi-approved="true">BSD -- Apache Software License (ASL) 2.0</license>
-        <geronimo-version>1.2-beta</geronimo-version>
+        <geronimo-version>2.0.1</geronimo-version>
         <dependency>org.apache.geronimo/j2ee-server//car</dependency>
         <dependency>org.apache.servicemix/servicemix-jbi//jar</dependency>
         <dependency>org.apache.servicemix/servicemix-core//jar</dependency>

Modified: incubator/servicemix/trunk/platforms/geronimo/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/platforms/geronimo/pom.xml?rev=580072&r1=580071&r2=580072&view=diff
==============================================================================
--- incubator/servicemix/trunk/platforms/geronimo/pom.xml (original)
+++ incubator/servicemix/trunk/platforms/geronimo/pom.xml Thu Sep 27 09:03:53 2007
@@ -33,12 +33,20 @@
     <packaging>pom</packaging>
   
     <properties>
-        <geronimo-version>1.2-beta</geronimo-version>
+        <geronimo-version>2.0.1</geronimo-version>
         <geronimoVersion>${geronimo-version}</geronimoVersion>
         <car-maven-plugin-version>${geronimo-version}</car-maven-plugin-version>
         <geronimoSchemaVersion>1.2</geronimoSchemaVersion>
         <gbeanDeployer>org.apache.geronimo.configs/geronimo-gbean-deployer/${version}/car</gbeanDeployer>
+        <xbean-version>3.1</xbean-version>
     </properties>
+
+    <repositories>
+	    <repository>
+		   <id>geronimo-2.0.1-repo</id>
+		   <url>http://svn.apache.org/repos/asf/geronimo/server/tags/2.0.1/repository</url>
+		</repository>
+	</repositories>
     
     <modules>
         <module>servicemix-service</module>

Modified: incubator/servicemix/trunk/platforms/geronimo/servicemix-service/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/platforms/geronimo/servicemix-service/pom.xml?rev=580072&r1=580071&r2=580072&view=diff
==============================================================================
--- incubator/servicemix/trunk/platforms/geronimo/servicemix-service/pom.xml (original)
+++ incubator/servicemix/trunk/platforms/geronimo/servicemix-service/pom.xml Thu Sep 27 09:03:53
2007
@@ -40,6 +40,12 @@
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-kernel</artifactId>
             <version>${geronimo-version}</version>
+			<scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-naming</artifactId>
+            <version>${geronimo-version}</version>
         </dependency>
     </dependencies>
 

Modified: incubator/servicemix/trunk/platforms/geronimo/servicemix-service/src/main/java/org/apache/servicemix/geronimo/ServiceMixGBean.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/platforms/geronimo/servicemix-service/src/main/java/org/apache/servicemix/geronimo/ServiceMixGBean.java?rev=580072&r1=580071&r2=580072&view=diff
==============================================================================
--- incubator/servicemix/trunk/platforms/geronimo/servicemix-service/src/main/java/org/apache/servicemix/geronimo/ServiceMixGBean.java
(original)
+++ incubator/servicemix/trunk/platforms/geronimo/servicemix-service/src/main/java/org/apache/servicemix/geronimo/ServiceMixGBean.java
Thu Sep 27 09:03:53 2007
@@ -17,17 +17,22 @@
 package org.apache.servicemix.geronimo;
 
 import java.io.File;
-import java.util.Collection;
+import java.util.Set;
 
 import javax.jbi.JBIException;
 import javax.transaction.TransactionManager;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.naming.java.RootContext;
 import org.apache.servicemix.jbi.container.ComponentEnvironment;
 import org.apache.servicemix.jbi.container.JBIContainer;
 import org.apache.servicemix.jbi.container.ServiceAssemblyEnvironment;
@@ -43,9 +48,8 @@
     private JBIContainer container;
     private String name;
     private String directory;
-    private TransactionManager transactionManager;
+    private final AbstractNameQuery transactionManagerName;
     private Kernel kernel;
-    private Collection jndiResources;
 
     public static final GBeanInfo GBEAN_INFO;
 
@@ -54,7 +58,7 @@
         infoFactory.addInterface(Container.class);
         infoFactory.addAttribute("name", String.class, true);
         infoFactory.addAttribute("directory", String.class, true);
-        infoFactory.addReference("transactionManager", TransactionManager.class);
+        infoFactory.addAttribute("transactionManager", AbstractNameQuery.class, true, true);
         infoFactory.addAttribute("kernel", Kernel.class, false);
         infoFactory.setConstructor(new String[]{"name", "directory", "transactionManager",
"kernel"});
         GBEAN_INFO = infoFactory.getBeanInfo();
@@ -66,25 +70,15 @@
 
     public ServiceMixGBean(String name, 
     					   String directory, 
-    					   TransactionManager transactionManager, 
+    					   AbstractNameQuery transactionManagerName, 
     					   Kernel kernel) {
         this.name = name;
         this.directory = directory;
-        this.transactionManager = transactionManager;
+        this.transactionManagerName = transactionManagerName;
         this.kernel = kernel;
         if (log.isDebugEnabled()) {
             log.debug("ServiceMixGBean created");
         }
-        /*
-        // Print available jndi resources
-        Set patterns = new HashSet();
-        this.jndiResources = kernel.listGBeans(patterns);
-        for (Iterator it = jndiResources.iterator(); it.hasNext();) {
-        	ObjectName name = (ObjectName) it.next();
-        	log.info("Resource name: " + name);
-        	log.info("Resource inst: " + kernel.)
-        }
-        */
     }
     
     /**
@@ -102,6 +96,7 @@
             if (container == null) {
                 container = createContainer();
                 container.init();
+                RootContext.setComponentContext(container.getNamingContext());
                 container.start();
             }
         } finally {
@@ -148,16 +143,30 @@
         }
     }
 
-    private JBIContainer createContainer() {
+    private JBIContainer createContainer() throws GBeanNotFoundException {
         JBIContainer container = new JBIContainer();
         container.setName(name);
         container.setRootDir(directory);
-        container.setTransactionManager(transactionManager);
+        TransactionManager tm = getTransactionManager();
+        container.setTransactionManager(tm);
         container.setMonitorInstallationDirectory(false);
         container.setMonitorDeploymentDirectory(false);
         return container;
     }
     
+    /**
+     * Determines the TM from Geronimo
+     * 
+     * @return TransactionManager
+     * @throws GBeanNotFoundException
+     */
+    private TransactionManager getTransactionManager() throws GBeanNotFoundException {
+        Set listGBeans = kernel.listGBeans(transactionManagerName);
+        AbstractName tmName = (AbstractName) listGBeans.iterator().next();
+        TransactionManager tm = (TransactionManager) kernel.getGBean(tmName);
+        return tm;
+    }
+
     public void register(Component component) throws Exception {
         ComponentNameSpace cns = new ComponentNameSpace(container.getName(), component.getName());
         ComponentContextImpl context = new ComponentContextImpl(container, cns);

Modified: incubator/servicemix/trunk/platforms/geronimo/servicemix/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/platforms/geronimo/servicemix/pom.xml?rev=580072&r1=580071&r2=580072&view=diff
==============================================================================
--- incubator/servicemix/trunk/platforms/geronimo/servicemix/pom.xml (original)
+++ incubator/servicemix/trunk/platforms/geronimo/servicemix/pom.xml Thu Sep 27 09:03:53 2007
@@ -36,30 +36,37 @@
         <dependency>
             <groupId>org.apache.servicemix.geronimo</groupId>
             <artifactId>dependencies</artifactId>
-            <version>3.2-SNAPSHOT</version>
+            <version>${version}</version>
             <scope>provided</scope>
         </dependency>
         <!-- For build ordering -->
         <dependency>
             <groupId>org.apache.servicemix.geronimo</groupId>
             <artifactId>servicemix-service</artifactId>
-            <version>3.2-SNAPSHOT</version>
+            <version>${version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.servicemix</groupId>
             <artifactId>servicemix-jbi</artifactId>
-            <version>3.2-SNAPSHOT</version>
+            <version>${version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.servicemix</groupId>
             <artifactId>servicemix-core</artifactId>
-            <version>3.2-SNAPSHOT</version>
+            <version>${version}</version>
         </dependency>
         <dependency>
             <groupId>org.apache.servicemix</groupId>
             <artifactId>servicemix-services</artifactId>
-            <version>3.2-SNAPSHOT</version>
+            <version>${version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+			<artifactId>servicemix-components</artifactId>
+            <version>${version}</version>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.activemq</groupId>
             <artifactId>activemq-core</artifactId>
@@ -153,8 +160,8 @@
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>geronimo-gbean-deployer</artifactId>
             <version>${geronimo-version}</version>
-            <scope>provided</scope>
             <type>car</type>
+			<scope>provided</scope>
         </dependency>
     </dependencies>
 

Modified: incubator/servicemix/trunk/platforms/geronimo/servicemix/src/plan/geronimo-service.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/platforms/geronimo/servicemix/src/plan/geronimo-service.xml?rev=580072&r1=580071&r2=580072&view=diff
==============================================================================
--- incubator/servicemix/trunk/platforms/geronimo/servicemix/src/plan/geronimo-service.xml
(original)
+++ incubator/servicemix/trunk/platforms/geronimo/servicemix/src/plan/geronimo-service.xml
Thu Sep 27 09:03:53 2007
@@ -24,10 +24,9 @@
 
     <gbean name="ServiceMixJBIContainer" class="org.apache.servicemix.geronimo.ServiceMixGBean">
         <attribute name="name">servicemix</attribute>
-        <attribute name="directory">var/servicemix</attribute>
-        <reference name="transactionManager">
-          <name>TransactionManager</name>
-        </reference>
+        <attribute name="transactionManager">?name=TransactionManager</attribute>
+        <!-- relative to bin directory -->
+        <attribute name="directory">../var/servicemix</attribute>
     </gbean>
 
 </module>



Mime
View raw message