Commit in servicemix/base on MAIN
src/main/java/org/servicemix/jbi/deployment/Provider.java+44added 1.1
                                           /Connections.java+34added 1.1
                                           /Connection.java+6-61.1 -> 1.2
                                           /ServiceAssembly.java+49-441.2 -> 1.3
                                           /Producer.java-441.1 removed
src/main/java/org/servicemix/jbi/deployment/impl/JbiNamespaceProcessor.java+49-331.4 -> 1.5
                                                /JbiElementProcessor.java+2-31.6 -> 1.7
project.xml+181.66 -> 1.67
src/main/java/org/servicemix/jbi/framework/DeploymentService.java+6-61.9 -> 1.10
src/main/java/org/servicemix/jbi/config/spring/ElementToPropertyProcessor.java+2-21.2 -> 1.3
                                              /ElementProcessorSupport.java+7-41.4 -> 1.5
+217-142
2 added + 1 removed + 8 modified, total 11 files
Modifications on the having on the connections/connection elements on a Service Assembly,  including the handling of the Provider (previously it was marked a producer), changed to match spec

servicemix/base/src/main/java/org/servicemix/jbi/deployment
Provider.java added at 1.1
diff -N Provider.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Provider.java	8 Aug 2005 00:42:56 -0000	1.1
@@ -0,0 +1,44 @@
+/** 
+ * 
+ * Copyright 2005 LogicBlaze, Inc. http://www.logicblaze.com
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License. 
+ * 
+ **/
+package org.servicemix.jbi.deployment;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+public class Provider {
+    private QName serviceName;
+    private String endpointName;
+
+    public QName getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(QName serviceName) {
+        this.serviceName = serviceName;
+    }
+
+    public String getEndpointName() {
+        return endpointName;
+    }
+
+    public void setEndpointName(String endpointName) {
+        this.endpointName = endpointName;
+    }
+}

servicemix/base/src/main/java/org/servicemix/jbi/deployment
Connections.java added at 1.1
diff -N Connections.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Connections.java	8 Aug 2005 00:42:56 -0000	1.1
@@ -0,0 +1,34 @@
+/** 
+ * 
+ * Copyright 2005 Unity Systems, LLC. http://www.unity-systems.com
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); 
+ * you may not use this file except in compliance with the License. 
+ * You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License. 
+ * 
+ **/
+package org.servicemix.jbi.deployment;
+
+/**
+ * Inner class used to handle the grouping of connections
+ * 
+ */
+public class Connections {
+	private Connection[] connections;
+
+	public Connection[] getConnections() {
+		return connections;
+	}
+
+	public void setConnections(Connection[] connections) {
+		this.connections = connections;
+	}
+}

servicemix/base/src/main/java/org/servicemix/jbi/deployment
Connection.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- Connection.java	13 Jun 2005 13:41:25 -0000	1.1
+++ Connection.java	8 Aug 2005 00:42:56 -0000	1.2
@@ -18,11 +18,11 @@
 package org.servicemix.jbi.deployment;
 
 /**
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
  */
 public class Connection {
     private Consumer consumer;
-    private Producer producer;
+    private Provider provider;
 
     public Consumer getConsumer() {
         return consumer;
@@ -32,11 +32,11 @@
         this.consumer = consumer;
     }
 
-    public Producer getProducer() {
-        return producer;
+    public Provider getProducer() {
+        return provider;
     }
 
-    public void setProducer(Producer producer) {
-        this.producer = producer;
+    public void setProducer(Provider producer) {
+        this.provider = producer;
     }
 }

servicemix/base/src/main/java/org/servicemix/jbi/deployment
ServiceAssembly.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- ServiceAssembly.java	29 Jun 2005 16:19:54 -0000	1.2
+++ ServiceAssembly.java	8 Aug 2005 00:42:56 -0000	1.3
@@ -18,49 +18,54 @@
 package org.servicemix.jbi.deployment;
 
 /**
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
  */
-public class ServiceAssembly {
-    private Identification identification;
-    private ServiceUnit[] serviceUnits;
-    private Connection[] connections;
-    private String state = "";
-
-    public Identification getIdentification() {
-        return identification;
-    }
-
-    public void setIdentification(Identification identification) {
-        this.identification = identification;
-    }
-
-    public ServiceUnit[] getServiceUnits() {
-        return serviceUnits;
-    }
-
-    public void setServiceUnits(ServiceUnit[] serviceUnits) {
-        this.serviceUnits = serviceUnits;
-    }
-
-    public Connection[] getConnections() {
-        return connections;
-    }
-
-    public void setConnections(Connection[] connections) {
-        this.connections = connections;
-    }
-    
-   
-    /**
-     * @return Returns the state.
-     */
-    public String getState() {
-        return state;
-    }
-    /**
-     * @param state The state to set.
-     */
-    public void setState(String state) {
-        this.state = state;
-    }
+public class ServiceAssembly {	
+
+	private Connections connections = new Connections();
+
+	private Identification identification;
+
+	private ServiceUnit[] serviceUnits;
+	
+	private String state = "";
+
+	public Connections getConnections() {
+		return connections;
+	}
+
+	public Identification getIdentification() {
+		return identification;
+	}
+
+	public ServiceUnit[] getServiceUnits() {
+		return serviceUnits;
+	}
+
+	/**
+	 * @return Returns the state.
+	 */
+	public String getState() {
+		return state;
+	}
+
+	public void setConnections(Connections connections) {
+		this.connections = connections;
+	}
+
+	public void setIdentification(Identification identification) {
+		this.identification = identification;
+	}
+
+	public void setServiceUnits(ServiceUnit[] serviceUnits) {
+		this.serviceUnits = serviceUnits;
+	}
+
+	/**
+	 * @param state
+	 *            The state to set.
+	 */
+	public void setState(String state) {
+		this.state = state;
+	}
 }

servicemix/base/src/main/java/org/servicemix/jbi/deployment
Producer.java removed after 1.1
diff -N Producer.java
--- Producer.java	13 Jun 2005 13:41:25 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-/** 
- * 
- * Copyright 2005 LogicBlaze, Inc. http://www.logicblaze.com
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- * 
- **/
-package org.servicemix.jbi.deployment;
-
-import javax.xml.namespace.QName;
-
-/**
- * @version $Revision: 1.1 $
- */
-public class Producer {
-    private QName serviceName;
-    private String endpointName;
-
-    public QName getServiceName() {
-        return serviceName;
-    }
-
-    public void setServiceName(QName serviceName) {
-        this.serviceName = serviceName;
-    }
-
-    public String getEndpointName() {
-        return endpointName;
-    }
-
-    public void setEndpointName(String endpointName) {
-        this.endpointName = endpointName;
-    }
-}

servicemix/base/src/main/java/org/servicemix/jbi/deployment/impl
JbiNamespaceProcessor.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- JbiNamespaceProcessor.java	27 Jun 2005 03:49:25 -0000	1.4
+++ JbiNamespaceProcessor.java	8 Aug 2005 00:42:57 -0000	1.5
@@ -19,43 +19,59 @@
 
 import org.servicemix.jbi.config.spring.BeanElementProcessor;
 import org.servicemix.jbi.config.spring.CompositeElementProcessor;
-import org.servicemix.jbi.deployment.*;
+import org.servicemix.jbi.deployment.ClassPath;
+import org.servicemix.jbi.deployment.Connection;
+import org.servicemix.jbi.deployment.Connections;
+import org.servicemix.jbi.deployment.Consumer;
+import org.servicemix.jbi.deployment.Consumes;
+import org.servicemix.jbi.deployment.Descriptor;
+import org.servicemix.jbi.deployment.Identification;
+import org.servicemix.jbi.deployment.Provider;
+import org.servicemix.jbi.deployment.Provides;
+import org.servicemix.jbi.deployment.ServiceAssembly;
+import org.servicemix.jbi.deployment.ServiceUnit;
+import org.servicemix.jbi.deployment.Services;
+import org.servicemix.jbi.deployment.SharedLibraryList;
+import org.servicemix.jbi.deployment.Target;
 
 /**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
  */
 public class JbiNamespaceProcessor extends CompositeElementProcessor {
-    public static final String JBI_NAMESPACE = "http://java.sun.com/xml/ns/jbi";
+	public static final String JBI_NAMESPACE = "http://java.sun.com/xml/ns/jbi";
 
-    private BeanElementProcessor sharedListProcessor;
+	private BeanElementProcessor sharedListProcessor;
 
-    public JbiNamespaceProcessor() {
-        super(JBI_NAMESPACE);
-    }
-
-    protected void loadLocalNameToProcessorMap() {
-
-        // TODO we can hopefully code generate this one day using annotations etc?
-        registerBeanPropertyProcessor("bootstrap-class-path", ClassPath.class);
-        registerBeanPropertyProcessor("component-class-path", ClassPath.class);
-        registerProcessor("component", new ComponentElementProcessor(this));
-        registerBeanPropertyProcessor("connection", Connection.class);
-        registerBeanPropertyProcessor("consumer", Consumer.class);
-        registerBeanPropertyProcessor("consumes", Consumes.class);
-        registerBeanPropertyProcessor("identification", Identification.class);
-        registerBeanProcessor("jbi", Descriptor.class);
-        registerValueAlias("path-element");
-        registerBeanPropertyProcessor("producer", Producer.class);
-        registerBeanPropertyProcessor("provides", Provides.class);
-        registerBeanPropertyProcessor("service-assembly", ServiceAssembly.class);
-        registerBeanPropertyProcessor("services", Services.class);
-        registerBeanProcessor("service-unit", ServiceUnit.class);
-        registerBeanPropertyProcessor("target", Target.class);
-
-        sharedListProcessor = registerBeanProcessor("shared-library-list", SharedLibraryList.class, "name");
-    }
-
-    public BeanElementProcessor getSharedListProcessor() {
-        return sharedListProcessor;
-    }
+	public JbiNamespaceProcessor() {
+		super(JBI_NAMESPACE);
+	}
+
+	protected void loadLocalNameToProcessorMap() {
+
+		// TODO we can hopefully code generate this one day using annotations
+		// etc?
+		registerBeanPropertyProcessor("bootstrap-class-path", ClassPath.class);
+		registerBeanPropertyProcessor("component-class-path", ClassPath.class);
+		registerProcessor("component", new ComponentElementProcessor(this));
+		registerBeanPropertyProcessor("connection", Connection.class);
+		registerBeanPropertyProcessor("connections", Connections.class);
+		registerBeanPropertyProcessor("consumer", Consumer.class);
+		registerBeanPropertyProcessor("consumes", Consumes.class);
+		registerBeanPropertyProcessor("identification", Identification.class);
+		registerBeanProcessor("jbi", Descriptor.class);
+		registerValueAlias("path-element");
+		registerBeanPropertyProcessor("provider", Provider.class);
+		registerBeanPropertyProcessor("provides", Provides.class);
+		registerBeanPropertyProcessor("service-assembly", ServiceAssembly.class);
+		registerBeanPropertyProcessor("services", Services.class);
+		registerBeanProcessor("service-unit", ServiceUnit.class);
+		registerBeanPropertyProcessor("target", Target.class);
+
+		sharedListProcessor = registerBeanProcessor("shared-library-list",
+				SharedLibraryList.class, "name");
+	}
+
+	public BeanElementProcessor getSharedListProcessor() {
+		return sharedListProcessor;
+	}
 }

servicemix/base/src/main/java/org/servicemix/jbi/deployment/impl
JbiElementProcessor.java 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- JbiElementProcessor.java	13 Jul 2005 09:15:00 -0000	1.6
+++ JbiElementProcessor.java	8 Aug 2005 00:42:57 -0000	1.7
@@ -32,7 +32,7 @@
 import javax.xml.transform.TransformerException;
 
 /**
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
  */
 public class JbiElementProcessor extends ElementProcessorSupport implements ElementProcessor {
     private static final transient Log log = LogFactory.getLog(JbiElementProcessor.class);
@@ -58,8 +58,7 @@
             bean.setAttribute("id", "jbi");
         }
         bean.setAttribute("singleton", "true");
-
-        moveToProperyListElement(bean, "connection", "connections");
+                
         moveToProperyListElement(bean, "path-element", "pathElements");
         moveToProperyListElement(bean, "service-unit", "serviceUnits");
 

servicemix/base
project.xml 1.66 -> 1.67
diff -u -r1.66 -r1.67
--- project.xml	5 Aug 2005 13:22:03 -0000	1.66
+++ project.xml	8 Aug 2005 00:42:57 -0000	1.67
@@ -127,6 +127,12 @@
       <id>dandiep</id>
       <email>[EMAIL PROTECTED]</email>
     </developer>
+    <developer>
+      <name>Philip Dodds</name>
+      <id>pdodds</id>
+      <email>[EMAIL PROTECTED]</email>
+      <organization>Unity Systems</organization>
+    </developer>
   </developers>
 
   <contributors>
@@ -927,6 +933,18 @@
             <include>**/*.properties</include>
             <include>**/*.x*</include>
             <include>**/*.wsdl</include>
+          </includes>
+        </resource>
+        <resource>
+          <directory>src/test/components</directory>
+          <includes>
+            <include>**/*.jar</include>
+          </includes>
+        </resource>
+        <resource>
+          <directory>src/test/assemblies</directory>
+          <includes>
+            <include>**/*.jar</include>
           </includes>
         </resource>
       </resources>

servicemix/base/src/main/java/org/servicemix/jbi/framework
DeploymentService.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- DeploymentService.java	2 Aug 2005 15:37:23 -0000	1.9
+++ DeploymentService.java	8 Aug 2005 00:42:57 -0000	1.10
@@ -40,7 +40,7 @@
 import org.servicemix.jbi.deployment.Connection;
 import org.servicemix.jbi.deployment.Consumer;
 import org.servicemix.jbi.deployment.Descriptor;
-import org.servicemix.jbi.deployment.Producer;
+import org.servicemix.jbi.deployment.Provider;
 import org.servicemix.jbi.deployment.ServiceAssembly;
 import org.servicemix.jbi.deployment.ServiceUnit;
 import org.servicemix.jbi.deployment.Target;
@@ -54,7 +54,7 @@
 /**
  * The deployment service MBean allows administrative tools to manage service assembly deployments.
  * 
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
  */
 public class DeploymentService extends BaseLifeCycle implements DeploymentServiceMBean {
     private static final Log log = LogFactory.getLog(DeploymentService.class);
@@ -608,18 +608,18 @@
 
     protected void buildConnections(ServiceAssembly sa) {
         if (sa != null) {
-            Connection[] connections = sa.getConnections();
+            Connection[] connections = sa.getConnections().getConnections();
             if (connections != null) {
                 for (int i = 0;i < connections.length;i++) {
                     Connection connection = connections[i];
                     Consumer consumer = connection.getConsumer();
-                    Producer producer = connection.getProducer();
+                    Provider provider = connection.getProducer();
                     QName suName = consumer.getInterfaceName();
                     if (suName != null) {
                         LocalComponentConnector lcc = (LocalComponentConnector) container.getRegistry()
                                 .getComponentConnector(suName);
-                        lcc.getActivationSpec().setDestinationEndpoint(producer.getEndpointName());
-                        lcc.getActivationSpec().setDestinationService(producer.getServiceName());
+                        lcc.getActivationSpec().setDestinationEndpoint(provider.getEndpointName());
+                        lcc.getActivationSpec().setDestinationService(provider.getServiceName());
                     }
                 }
             }

servicemix/base/src/main/java/org/servicemix/jbi/config/spring
ElementToPropertyProcessor.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- ElementToPropertyProcessor.java	12 Jul 2005 14:54:17 -0000	1.2
+++ ElementToPropertyProcessor.java	8 Aug 2005 00:42:57 -0000	1.3
@@ -31,7 +31,7 @@
  * Converts an XML element into a property declaration. The element name is used as the property
  * name unless it is overloaded.
  *
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
  */
 public class ElementToPropertyProcessor extends ElementProcessorSupport implements ElementProcessor {
     private String propertyName;
@@ -46,7 +46,7 @@
     public void processElement(Element element, BeanDefinitionReader beanDefinitionReader, Resource resource) {
         Element bean = (Element) element.getParentNode();
         bean.removeChild(element);
-
+        
         String name = propertyName;
         if (name == null) {
             name = getElementNameToPropertyName(element);

servicemix/base/src/main/java/org/servicemix/jbi/config/spring
ElementProcessorSupport.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- ElementProcessorSupport.java	12 Jul 2005 14:54:17 -0000	1.4
+++ ElementProcessorSupport.java	8 Aug 2005 00:42:57 -0000	1.5
@@ -39,7 +39,7 @@
 /**
  * A useful base class for transforming the configuration elements into regular Spring XML elements
  *
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
  */
 public class ElementProcessorSupport {
     public static final String NAMESPACE = "";
@@ -87,7 +87,7 @@
      */
     protected Element addPropertyElement(Node bean, String propertyName) {
         Element property = addElement(bean, "property");
-        property.setAttribute("name", propertyName);
+        property.setAttribute("name", convertToCamelCase(propertyName));
         return property;
     }
 
@@ -135,9 +135,12 @@
 
     protected String getElementNameToPropertyName(Element element) {
         String name = element.getNodeName();
-
         // lets turn dashes into camel case
-        while (true) {
+        return convertToCamelCase(name);
+    }
+    
+    protected String convertToCamelCase(String name) {
+    	while (true) {
             int idx = name.indexOf('-');
             if (idx >= 0) {
                 String prefix = name.substring(0, idx);
CVSspam 0.2.8



Reply via email to