You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ch...@apache.org on 2006/02/22 00:40:29 UTC

svn commit: r379627 [18/34] - in /incubator/servicemix/trunk: ./ etc/ sandbox/servicemix-wsn-1.2/src/sa/META-INF/ sandbox/servicemix-wsn-1.2/src/su/META-INF/ servicemix-assembly/ servicemix-assembly/src/main/assembly/ servicemix-assembly/src/main/relea...

Modified: incubator/servicemix/trunk/servicemix-sca/project.xml
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/project.xml?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/project.xml (original)
+++ incubator/servicemix/trunk/servicemix-sca/project.xml Tue Feb 21 15:40:05 2006
@@ -1,363 +1,363 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
-
-    Copyright 2005 The Apache Software Foundation
-
-    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.
-
--->
-
-<project>
-  <pomVersion>3</pomVersion>
-  <extend>${basedir}/../etc/project.xml</extend>
-
-  <name>ServiceMix :: SCA Service Engine</name>
-  <id>servicemix-sca</id>
-  <description>SCA service engine</description>
-
-  <package>org.apache.servicemix.sca</package>
-
-  <packageGroups>
-    <packageGroup>
-      <title>SCA Service Engine Implementation</title>
-      <packages>org.apache.servicemix.sca</packages>
-    </packageGroup>
-  </packageGroups>
-
-  <siteDirectory>/home/projects/servicemix/public_html/maven/sca</siteDirectory>
-
-  <dependencies>
-
-      <dependency>
-        <groupId>${pom.groupId}</groupId>
-        <artifactId>maven-jbi-plugin</artifactId>
-        <version>${pom.currentVersion}</version>
-        <type>plugin</type>
-      </dependency>
-    
-      <!-- JBI bundled dependencies -->
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>servicemix-common</artifactId>
-      <version>${pom.currentVersion}</version>
-      <properties>
-        <eclipse.dependency>true</eclipse.dependency>
-        <jbi.bundle>true</jbi.bundle>
-        <jbi.bootstrap>true</jbi.bootstrap>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.emf</groupId>
-      <artifactId>commonj-sdo</artifactId>
-      <version>${eclipse_emf_version}</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.emf</groupId>
-      <artifactId>ecore</artifactId>
-      <version>${eclipse_emf_version}</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.emf</groupId>
-      <artifactId>common</artifactId>
-      <version>${eclipse_emf_version}</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.emf</groupId>
-      <artifactId>ecore-sdo</artifactId>
-      <version>2.1.1</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.emf</groupId>
-      <artifactId>ecore-change</artifactId>
-      <version>${eclipse_emf_version}</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.emf</groupId>
-      <artifactId>ecore-xmi</artifactId>
-      <version>${eclipse_emf_version}</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.wtp</groupId>
-      <artifactId>wsdl</artifactId>
-      <version>${eclipse_wtp_version}</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.xsd</groupId>
-      <artifactId>xsd</artifactId>
-      <version>${eclipse_xsd_version}</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>servicemix</groupId>
-      <artifactId>tuscany-common</artifactId>
-      <version>dev-200512</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>servicemix</groupId>
-      <artifactId>tuscany-container-java</artifactId>
-      <version>dev-200512</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>servicemix</groupId>
-      <artifactId>tuscany-core</artifactId>
-      <version>dev-200512</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>servicemix</groupId>
-      <artifactId>tuscany-model</artifactId>
-      <version>dev-200512</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>servicemix</groupId>
-      <artifactId>sca-api</artifactId>
-      <version>dev-200512</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>servicemix</groupId>
-      <artifactId>jaxb-impl</artifactId>
-      <version>${jaxb_version}</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
-      <version>${commons_logging_version}</version>
-      <properties>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>wsdl4j</groupId>
-      <artifactId>wsdl4j</artifactId>
-      <version>${wsdl4j_version}</version>
-      <properties>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>servicemix</groupId>
-      <artifactId>jaxb-api</artifactId>
-      <version>${jaxb_version}</version>
-      <properties>
-        <jbi.bundle>true</jbi.bundle>
-      </properties>
-    </dependency>
-    <dependency>
-      <groupId>stax</groupId>
-      <artifactId>stax-api</artifactId>
-      <version>${stax_api_version}</version>
-      <properties>
-      </properties>
-    </dependency>
-
-      <!-- Provided dependencies -->
-		<dependency>
-			<groupId>backport-util-concurrent</groupId>
-			<artifactId>backport-util-concurrent</artifactId>
-			<version>${backport_util_concurrent_version}</version>
-		</dependency>
-		<dependency>
-			<groupId>activeio</groupId>
-			<artifactId>activeio</artifactId>
-			<version>${activeio_version}</version>
-		</dependency>
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>servicemix-core</artifactId>
-      <version>${pom.currentVersion}</version>
-      <properties>
-        <eclipse.dependency>true</eclipse.dependency>
-      </properties>
-    </dependency>
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
-        <version>${geronimo_spec_j2ee_connector_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
-        <version>${geronimo_spec_jta_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>${pom.groupId}</groupId>
-        <artifactId>servicemix-jbi</artifactId>
-        <version>${pom.currentVersion}</version>
-        <properties>
-          <eclipse.dependency>true</eclipse.dependency>
-        </properties>
-      </dependency>
-      <dependency>
-        <groupId>mx4j</groupId>
-        <artifactId>mx4j</artifactId>
-        <version>${mx4j_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>mx4j</groupId>
-        <artifactId>mx4j-remote</artifactId>
-        <version>${mx4j_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>xfire</groupId>
-        <artifactId>XmlSchema</artifactId>
-        <version>${xfire_xmlschema_version}</version>
-      </dependency>
-
-      <!-- Testing only -->
-      <dependency>
-        <groupId>${pom.groupId}</groupId>
-        <artifactId>servicemix-components</artifactId>
-        <version>${pom.currentVersion}</version>
-        <properties>
-          <eclipse.dependency>true</eclipse.dependency>
-        </properties>
-      </dependency>
-      <dependency>
-        <groupId>springframework</groupId>
-        <artifactId>spring</artifactId>
-        <version>${spring_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>incubator-activemq</groupId>
-        <artifactId>activemq-core</artifactId>
-        <version>${activemq_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>jencks</groupId>
-        <artifactId>jencks-all</artifactId>
-        <version>${jencks_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>concurrent</groupId>
-        <artifactId>concurrent</artifactId>
-        <version>${concurrent_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>commons-beanutils</groupId>
-        <artifactId>commons-beanutils</artifactId>
-        <version>${commons_beanutils_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>log4j</groupId>
-        <artifactId>log4j</artifactId>
-        <version>${log4j_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.geronimo.specs</groupId>
-        <artifactId>geronimo-activation_1.0.2_spec</artifactId>
-        <version>${geronimo_spec_activation_version}</version>
-      </dependency>
-      <dependency>
-        <groupId>annogen</groupId>
-        <artifactId>annogen</artifactId>
-        <version>${annogen_version}</version>
-        <properties>
-          <scope>compile</scope>
-        </properties>
-      </dependency>
-      <dependency>
-        <groupId>qdox</groupId>
-        <artifactId>qdox</artifactId>
-        <version>${qdox_version}</version>
-        <properties>
-          <scope>compile</scope>
-        </properties>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>xbean-spring</artifactId>
-        <version>${xbean_version}</version>
-        <properties>
-          <scope>compile</scope>
-        </properties>
-      </dependency>
-      <dependency>
-        <groupId>beehive</groupId>
-        <artifactId>wsm</artifactId>
-        <version>${beehive_wsm_version}</version>
-        <url>http://incubator.apache.org/beehive/</url>
-      </dependency>
-  </dependencies>
-
-  <build>
-
-    <unitTest>
-        <includes>
-            <include>**/*Test.*</include>
-        </includes>
-        <excludes>
-           <!-- http://jira.activemq.org/jira/browse/SM-313 -->
-          <exclude>**/ScaComponentTest.*</exclude>
-        </excludes>
-    </unitTest>
-
-    <resources>
-      <resource>
-          <directory>src/main/resources</directory>
-        <includes>
-          <include>**/*.xml</include>
-          <include>**/*.properties</include>
-          <include>**/*</include>
-        </includes>
-      </resource>
-      <!--
-      <resource>
-        <directory>target/generated</directory>
-        <includes>
-          <include>**/*</include>
-        </includes>
-      </resource>
-      -->
-    </resources>
-  </build>
-
-</project>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+
+    Copyright 2005 The Apache Software Foundation
+
+    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.
+
+-->
+
+<project>
+  <pomVersion>3</pomVersion>
+  <extend>${basedir}/../etc/project.xml</extend>
+
+  <name>ServiceMix :: SCA Service Engine</name>
+  <id>servicemix-sca</id>
+  <description>SCA service engine</description>
+
+  <package>org.apache.servicemix.sca</package>
+
+  <packageGroups>
+    <packageGroup>
+      <title>SCA Service Engine Implementation</title>
+      <packages>org.apache.servicemix.sca</packages>
+    </packageGroup>
+  </packageGroups>
+
+  <siteDirectory>/home/projects/servicemix/public_html/maven/sca</siteDirectory>
+
+  <dependencies>
+
+      <dependency>
+        <groupId>${pom.groupId}</groupId>
+        <artifactId>maven-jbi-plugin</artifactId>
+        <version>${pom.currentVersion}</version>
+        <type>plugin</type>
+      </dependency>
+    
+      <!-- JBI bundled dependencies -->
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>servicemix-common</artifactId>
+      <version>${pom.currentVersion}</version>
+      <properties>
+        <eclipse.dependency>true</eclipse.dependency>
+        <jbi.bundle>true</jbi.bundle>
+        <jbi.bootstrap>true</jbi.bootstrap>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.emf</groupId>
+      <artifactId>commonj-sdo</artifactId>
+      <version>${eclipse_emf_version}</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.emf</groupId>
+      <artifactId>ecore</artifactId>
+      <version>${eclipse_emf_version}</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.emf</groupId>
+      <artifactId>common</artifactId>
+      <version>${eclipse_emf_version}</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.emf</groupId>
+      <artifactId>ecore-sdo</artifactId>
+      <version>2.1.1</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.emf</groupId>
+      <artifactId>ecore-change</artifactId>
+      <version>${eclipse_emf_version}</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.emf</groupId>
+      <artifactId>ecore-xmi</artifactId>
+      <version>${eclipse_emf_version}</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.wtp</groupId>
+      <artifactId>wsdl</artifactId>
+      <version>${eclipse_wtp_version}</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.xsd</groupId>
+      <artifactId>xsd</artifactId>
+      <version>${eclipse_xsd_version}</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>servicemix</groupId>
+      <artifactId>tuscany-common</artifactId>
+      <version>dev-200512</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>servicemix</groupId>
+      <artifactId>tuscany-container-java</artifactId>
+      <version>dev-200512</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>servicemix</groupId>
+      <artifactId>tuscany-core</artifactId>
+      <version>dev-200512</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>servicemix</groupId>
+      <artifactId>tuscany-model</artifactId>
+      <version>dev-200512</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>servicemix</groupId>
+      <artifactId>sca-api</artifactId>
+      <version>dev-200512</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>servicemix</groupId>
+      <artifactId>jaxb-impl</artifactId>
+      <version>${jaxb_version}</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>${commons_logging_version}</version>
+      <properties>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>wsdl4j</groupId>
+      <artifactId>wsdl4j</artifactId>
+      <version>${wsdl4j_version}</version>
+      <properties>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>servicemix</groupId>
+      <artifactId>jaxb-api</artifactId>
+      <version>${jaxb_version}</version>
+      <properties>
+        <jbi.bundle>true</jbi.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>stax</groupId>
+      <artifactId>stax-api</artifactId>
+      <version>${stax_api_version}</version>
+      <properties>
+      </properties>
+    </dependency>
+
+      <!-- Provided dependencies -->
+		<dependency>
+			<groupId>backport-util-concurrent</groupId>
+			<artifactId>backport-util-concurrent</artifactId>
+			<version>${backport_util_concurrent_version}</version>
+		</dependency>
+		<dependency>
+			<groupId>activeio</groupId>
+			<artifactId>activeio</artifactId>
+			<version>${activeio_version}</version>
+		</dependency>
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>servicemix-core</artifactId>
+      <version>${pom.currentVersion}</version>
+      <properties>
+        <eclipse.dependency>true</eclipse.dependency>
+      </properties>
+    </dependency>
+      <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
+        <version>${geronimo_spec_j2ee_connector_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-jta_1.0.1B_spec</artifactId>
+        <version>${geronimo_spec_jta_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>${pom.groupId}</groupId>
+        <artifactId>servicemix-jbi</artifactId>
+        <version>${pom.currentVersion}</version>
+        <properties>
+          <eclipse.dependency>true</eclipse.dependency>
+        </properties>
+      </dependency>
+      <dependency>
+        <groupId>mx4j</groupId>
+        <artifactId>mx4j</artifactId>
+        <version>${mx4j_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>mx4j</groupId>
+        <artifactId>mx4j-remote</artifactId>
+        <version>${mx4j_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>xfire</groupId>
+        <artifactId>XmlSchema</artifactId>
+        <version>${xfire_xmlschema_version}</version>
+      </dependency>
+
+      <!-- Testing only -->
+      <dependency>
+        <groupId>${pom.groupId}</groupId>
+        <artifactId>servicemix-components</artifactId>
+        <version>${pom.currentVersion}</version>
+        <properties>
+          <eclipse.dependency>true</eclipse.dependency>
+        </properties>
+      </dependency>
+      <dependency>
+        <groupId>springframework</groupId>
+        <artifactId>spring</artifactId>
+        <version>${spring_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>incubator-activemq</groupId>
+        <artifactId>activemq-core</artifactId>
+        <version>${activemq_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>jencks</groupId>
+        <artifactId>jencks-all</artifactId>
+        <version>${jencks_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>concurrent</groupId>
+        <artifactId>concurrent</artifactId>
+        <version>${concurrent_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>commons-beanutils</groupId>
+        <artifactId>commons-beanutils</artifactId>
+        <version>${commons_beanutils_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>log4j</groupId>
+        <artifactId>log4j</artifactId>
+        <version>${log4j_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-activation_1.0.2_spec</artifactId>
+        <version>${geronimo_spec_activation_version}</version>
+      </dependency>
+      <dependency>
+        <groupId>annogen</groupId>
+        <artifactId>annogen</artifactId>
+        <version>${annogen_version}</version>
+        <properties>
+          <scope>compile</scope>
+        </properties>
+      </dependency>
+      <dependency>
+        <groupId>qdox</groupId>
+        <artifactId>qdox</artifactId>
+        <version>${qdox_version}</version>
+        <properties>
+          <scope>compile</scope>
+        </properties>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.xbean</groupId>
+        <artifactId>xbean-spring</artifactId>
+        <version>${xbean_version}</version>
+        <properties>
+          <scope>compile</scope>
+        </properties>
+      </dependency>
+      <dependency>
+        <groupId>beehive</groupId>
+        <artifactId>wsm</artifactId>
+        <version>${beehive_wsm_version}</version>
+        <url>http://incubator.apache.org/beehive/</url>
+      </dependency>
+  </dependencies>
+
+  <build>
+
+    <unitTest>
+        <includes>
+            <include>**/*Test.*</include>
+        </includes>
+        <excludes>
+           <!-- http://jira.activemq.org/jira/browse/SM-313 -->
+          <exclude>**/ScaComponentTest.*</exclude>
+        </excludes>
+    </unitTest>
+
+    <resources>
+      <resource>
+          <directory>src/main/resources</directory>
+        <includes>
+          <include>**/*.xml</include>
+          <include>**/*.properties</include>
+          <include>**/*</include>
+        </includes>
+      </resource>
+      <!--
+      <resource>
+        <directory>target/generated</directory>
+        <includes>
+          <include>**/*</include>
+        </includes>
+      </resource>
+      -->
+    </resources>
+  </build>
+
+</project>

Propchange: incubator/servicemix/trunk/servicemix-sca/project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/CommonsLoggingLogProvider.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/CommonsLoggingLogProvider.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/CommonsLoggingLogProvider.java (original)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/CommonsLoggingLogProvider.java Tue Feb 21 15:40:05 2006
@@ -1,138 +1,138 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * 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.apache.servicemix.sca;
-
-import org.apache.commons.logging.LogFactory;
-import org.apache.tuscany.common.logging.Log;
-import org.apache.tuscany.common.logging.LogProvider;
-
-public class CommonsLoggingLogProvider implements LogProvider {
-
-	public Log getLog(Class clazz) {
-		return new CommonsLoggingLog(LogFactory.getLog(clazz));
-	}
-
-	public Log getLog(Class clazz, String resourceBundleName) {
-		return new CommonsLoggingLog(LogFactory.getLog(clazz));
-	}
-	
-	public static class CommonsLoggingLog implements Log {
-
-		org.apache.commons.logging.Log log;
-		
-		public CommonsLoggingLog(org.apache.commons.logging.Log log) {
-			this.log = log;
-		}
-		
-		public boolean isDebugEnabled() {
-			return log.isDebugEnabled();
-		}
-
-		public boolean isEntryEnabled() {
-			return log.isTraceEnabled();
-		}
-
-		public boolean isEventEnabled() {
-			return log.isTraceEnabled();
-		}
-
-		public void debug(String message) {
-			log.debug(message);
-		}
-
-		public void debug(String message, Object obj) {
-			if (obj instanceof Throwable) {
-				log.debug(message, (Throwable) obj);
-			} else {
-				log.debug(message + ": " + obj);
-			}
-		}
-
-		public void event(String message) {
-			log.trace(message);
-		}
-
-		public void event(String message, Object obj) {
-			if (obj instanceof Throwable) {
-				log.trace(message, (Throwable) obj);
-			} else {
-				log.trace(message + ": " + obj);
-			}
-		}
-
-		public void entry(String message) {
-			log.debug(message);
-		}
-
-		public void entry(String message, Object obj) {
-			if (obj instanceof Throwable) {
-				log.trace(message, (Throwable) obj);
-			} else {
-				log.trace(message + ": " + obj);
-			}
-		}
-
-		public void exit(String message) {
-			log.debug(message);
-		}
-
-		public void exit(String message, Object obj) {
-			if (obj instanceof Throwable) {
-				log.trace(message, (Throwable) obj);
-			} else {
-				log.trace(message + ": " + obj);
-			}
-		}
-
-		public void info(String messageKey) {
-			log.info(messageKey);
-		}
-
-		public void info(String messageKey, Object[] objs) {
-			log.info(messageKey + ": " + objs);
-		}
-
-		public void warning(String messageKey) {
-			log.warn(messageKey);
-		}
-
-		public void warning(String messageKey, Object[] objs) {
-			log.warn(messageKey);
-		}
-
-		public void error(String messageKey) {
-			log.error(messageKey);
-		}
-
-		public void error(String messageKey, Object[] objs) {
-			log.error(messageKey);
-		}
-
-		public void error(String messageKey, Throwable throwable) {
-			log.error(messageKey, throwable);
-		}
-
-		public void fatal(Throwable throwable) {
-			log.fatal(null, throwable);
-		}
-
-		public void fatal(Throwable throwable, Object[] objs) {
-			log.fatal(null, throwable);
-		}
-		
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * 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.apache.servicemix.sca;
+
+import org.apache.commons.logging.LogFactory;
+import org.apache.tuscany.common.logging.Log;
+import org.apache.tuscany.common.logging.LogProvider;
+
+public class CommonsLoggingLogProvider implements LogProvider {
+
+	public Log getLog(Class clazz) {
+		return new CommonsLoggingLog(LogFactory.getLog(clazz));
+	}
+
+	public Log getLog(Class clazz, String resourceBundleName) {
+		return new CommonsLoggingLog(LogFactory.getLog(clazz));
+	}
+	
+	public static class CommonsLoggingLog implements Log {
+
+		org.apache.commons.logging.Log log;
+		
+		public CommonsLoggingLog(org.apache.commons.logging.Log log) {
+			this.log = log;
+		}
+		
+		public boolean isDebugEnabled() {
+			return log.isDebugEnabled();
+		}
+
+		public boolean isEntryEnabled() {
+			return log.isTraceEnabled();
+		}
+
+		public boolean isEventEnabled() {
+			return log.isTraceEnabled();
+		}
+
+		public void debug(String message) {
+			log.debug(message);
+		}
+
+		public void debug(String message, Object obj) {
+			if (obj instanceof Throwable) {
+				log.debug(message, (Throwable) obj);
+			} else {
+				log.debug(message + ": " + obj);
+			}
+		}
+
+		public void event(String message) {
+			log.trace(message);
+		}
+
+		public void event(String message, Object obj) {
+			if (obj instanceof Throwable) {
+				log.trace(message, (Throwable) obj);
+			} else {
+				log.trace(message + ": " + obj);
+			}
+		}
+
+		public void entry(String message) {
+			log.debug(message);
+		}
+
+		public void entry(String message, Object obj) {
+			if (obj instanceof Throwable) {
+				log.trace(message, (Throwable) obj);
+			} else {
+				log.trace(message + ": " + obj);
+			}
+		}
+
+		public void exit(String message) {
+			log.debug(message);
+		}
+
+		public void exit(String message, Object obj) {
+			if (obj instanceof Throwable) {
+				log.trace(message, (Throwable) obj);
+			} else {
+				log.trace(message + ": " + obj);
+			}
+		}
+
+		public void info(String messageKey) {
+			log.info(messageKey);
+		}
+
+		public void info(String messageKey, Object[] objs) {
+			log.info(messageKey + ": " + objs);
+		}
+
+		public void warning(String messageKey) {
+			log.warn(messageKey);
+		}
+
+		public void warning(String messageKey, Object[] objs) {
+			log.warn(messageKey);
+		}
+
+		public void error(String messageKey) {
+			log.error(messageKey);
+		}
+
+		public void error(String messageKey, Object[] objs) {
+			log.error(messageKey);
+		}
+
+		public void error(String messageKey, Throwable throwable) {
+			log.error(messageKey, throwable);
+		}
+
+		public void fatal(Throwable throwable) {
+			log.fatal(null, throwable);
+		}
+
+		public void fatal(Throwable throwable, Object[] objs) {
+			log.fatal(null, throwable);
+		}
+		
+	}
+
+}

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/CommonsLoggingLogProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaBootstrap.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaBootstrap.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaBootstrap.java (original)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaBootstrap.java Tue Feb 21 15:40:05 2006
@@ -1,22 +1,22 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * 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.apache.servicemix.sca;
-
-import org.apache.servicemix.common.BaseBootstrap;
-
-public class ScaBootstrap extends BaseBootstrap {
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * 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.apache.servicemix.sca;
+
+import org.apache.servicemix.common.BaseBootstrap;
+
+public class ScaBootstrap extends BaseBootstrap {
+
+}

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaBootstrap.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaComponent.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaComponent.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaComponent.java Tue Feb 21 15:40:05 2006
@@ -1,40 +1,40 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * 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.apache.servicemix.sca;
-
-import org.apache.servicemix.common.BaseComponent;
-import org.apache.servicemix.common.BaseLifeCycle;
-import org.apache.servicemix.common.BaseServiceUnitManager;
-import org.apache.servicemix.common.Deployer;
-
-public class ScaComponent extends BaseComponent {
-
-    /* (non-Javadoc)
-     * @see org.servicemix.common.BaseComponent#createLifeCycle()
-     */
-    protected BaseLifeCycle createLifeCycle() {
-        return new ScaLifeCycle(this);
-    }
-
-    /* (non-Javadoc)
-     * @see org.servicemix.common.BaseComponent#createServiceUnitManager()
-     */
-    public BaseServiceUnitManager createServiceUnitManager() {
-        Deployer[] deployers = new Deployer[] { new ScaDeployer(this) };
-        return new BaseServiceUnitManager(this, deployers);
-    }
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * 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.apache.servicemix.sca;
+
+import org.apache.servicemix.common.BaseComponent;
+import org.apache.servicemix.common.BaseLifeCycle;
+import org.apache.servicemix.common.BaseServiceUnitManager;
+import org.apache.servicemix.common.Deployer;
+
+public class ScaComponent extends BaseComponent {
+
+    /* (non-Javadoc)
+     * @see org.servicemix.common.BaseComponent#createLifeCycle()
+     */
+    protected BaseLifeCycle createLifeCycle() {
+        return new ScaLifeCycle(this);
+    }
+
+    /* (non-Javadoc)
+     * @see org.servicemix.common.BaseComponent#createServiceUnitManager()
+     */
+    public BaseServiceUnitManager createServiceUnitManager() {
+        Deployer[] deployers = new Deployer[] { new ScaDeployer(this) };
+        return new BaseServiceUnitManager(this, deployers);
+    }
+
+}

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaDeployer.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaDeployer.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaDeployer.java (original)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaDeployer.java Tue Feb 21 15:40:05 2006
@@ -1,57 +1,57 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * 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.apache.servicemix.sca;
-
-import java.io.File;
-
-import javax.jbi.management.DeploymentException;
-
-import org.apache.servicemix.common.AbstractDeployer;
-import org.apache.servicemix.common.BaseComponent;
-import org.apache.servicemix.common.ServiceUnit;
-
-public class ScaDeployer extends AbstractDeployer {
-
-	public static final String SCA_MODULE_FILE = "sca.module";
-	
-	public ScaDeployer(BaseComponent component) {
-		super(component);
-	}
-
-	public boolean canDeploy(String serviceUnitName, String serviceUnitRootPath) {
-		File module = new File(serviceUnitRootPath, SCA_MODULE_FILE);
-		return module.exists() && module.isFile();
-	}
-
-	public ServiceUnit deploy(String serviceUnitName, String serviceUnitRootPath)
-			throws DeploymentException {
-		File module = new File(serviceUnitRootPath, SCA_MODULE_FILE);
-		if (!module.exists() || !module.isFile()) {
-            throw failure("deploy", "No sca.module found", null);
-		}
-		try {
-			ScaServiceUnit su = new ScaServiceUnit();
-	        su.setComponent(component);
-	        su.setName(serviceUnitName);
-	        su.setRootPath(serviceUnitRootPath);
-	        su.init();
-	        return su;
-		} catch (Exception e) {
-			throw failure("deploy", "Error loading sca module", e);
-		}
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * 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.apache.servicemix.sca;
+
+import java.io.File;
+
+import javax.jbi.management.DeploymentException;
+
+import org.apache.servicemix.common.AbstractDeployer;
+import org.apache.servicemix.common.BaseComponent;
+import org.apache.servicemix.common.ServiceUnit;
+
+public class ScaDeployer extends AbstractDeployer {
+
+	public static final String SCA_MODULE_FILE = "sca.module";
+	
+	public ScaDeployer(BaseComponent component) {
+		super(component);
+	}
+
+	public boolean canDeploy(String serviceUnitName, String serviceUnitRootPath) {
+		File module = new File(serviceUnitRootPath, SCA_MODULE_FILE);
+		return module.exists() && module.isFile();
+	}
+
+	public ServiceUnit deploy(String serviceUnitName, String serviceUnitRootPath)
+			throws DeploymentException {
+		File module = new File(serviceUnitRootPath, SCA_MODULE_FILE);
+		if (!module.exists() || !module.isFile()) {
+            throw failure("deploy", "No sca.module found", null);
+		}
+		try {
+			ScaServiceUnit su = new ScaServiceUnit();
+	        su.setComponent(component);
+	        su.setName(serviceUnitName);
+	        su.setRootPath(serviceUnitRootPath);
+	        su.init();
+	        return su;
+		} catch (Exception e) {
+			throw failure("deploy", "Error loading sca module", e);
+		}
+	}
+
+}

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaDeployer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaEndpoint.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaEndpoint.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaEndpoint.java (original)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaEndpoint.java Tue Feb 21 15:40:05 2006
@@ -1,159 +1,159 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * 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.apache.servicemix.sca;
-
-import java.io.StringWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.jbi.component.ComponentContext;
-import javax.jbi.messaging.DeliveryChannel;
-import javax.jbi.messaging.ExchangeStatus;
-import javax.jbi.messaging.MessageExchange;
-import javax.jbi.messaging.NormalizedMessage;
-import javax.jbi.messaging.MessageExchange.Role;
-import javax.jbi.servicedesc.ServiceEndpoint;
-import javax.xml.bind.JAXBContext;
-
-import org.apache.servicemix.common.Endpoint;
-import org.apache.servicemix.common.ExchangeProcessor;
-import org.apache.servicemix.jbi.jaxp.StringSource;
-import org.apache.tuscany.core.invocation.spi.ProxyFactory;
-import org.apache.tuscany.model.assembly.ConfiguredReference;
-import org.apache.tuscany.model.assembly.ConfiguredService;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.Interface;
-import org.apache.tuscany.model.types.InterfaceType;
-import org.apache.tuscany.model.types.OperationType;
-import org.apache.tuscany.model.types.java.JavaOperationType;
-
-/**
- * 
- * @author gnodet
- * @version $Revision: 366467 $
- * @org.apache.xbean.XBean element="endpoint"
- *                  description="A sca endpoint"
- * 
- */
-public class ScaEndpoint extends Endpoint implements ExchangeProcessor {
-
-    protected ServiceEndpoint activated;
-    protected EntryPoint entryPoint;
-    protected Object proxy;
-    protected Map<Class, Method> methodMap;
-    protected JAXBContext jaxbContext;
-    protected DeliveryChannel channel;
-	
-	public ScaEndpoint(EntryPoint entryPoint) {
-		this.entryPoint = entryPoint;
-	}
-
-	public Role getRole() {
-		return Role.PROVIDER;
-	}
-
-	public void activate() throws Exception {
-        logger = this.serviceUnit.getComponent().getLogger();
-        ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
-        activated = ctx.activateEndpoint(service, endpoint);
-        channel = ctx.getDeliveryChannel();
-        // Get the target service
-        ConfiguredReference referenceValue = entryPoint.getConfiguredReference();
-        ConfiguredService targetServiceEndpoint = referenceValue.getConfiguredServices().get(0);
-        // Create a proxy
-        ProxyFactory proxyFactory = (ProxyFactory) targetServiceEndpoint.getProxyFactory();
-        proxy = proxyFactory.createProxy();
-        // Get the business interface
-        Interface targetInterface = targetServiceEndpoint.getService().getInterfaceContract();
-        InterfaceType targetInterfaceType = targetInterface.getInterfaceType();
-        List<Class> classes = new ArrayList<Class>();
-        methodMap = new HashMap<Class, Method>();
-        for (OperationType oper : targetInterfaceType.getOperationTypes()) {
-        	if (oper instanceof JavaOperationType) {
-        		Method mth = ((JavaOperationType) oper).getJavaMethod();
-        		Class[] params = mth.getParameterTypes();
-        		if (params.length != 1) {
-        			throw new IllegalStateException("Supports only methods with one parameter");
-        		}
-        		methodMap.put(params[0], mth);
-        		classes.add(mth.getReturnType());
-        		classes.add(params[0]);
-        	}
-        }
-        jaxbContext = JAXBContext.newInstance(classes.toArray(new Class[0]));
-	}
-
-	public void deactivate() throws Exception {
-        ServiceEndpoint ep = activated;
-        activated = null;
-        ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
-        ctx.deactivateEndpoint(ep);
-	}
-
-	public ExchangeProcessor getProcessor() {
-		return this;
-	}
-
-	public void process(MessageExchange exchange) throws Exception {
-		if (exchange.getStatus() == ExchangeStatus.DONE) {
-			return;
-		} else if (exchange.getStatus() == ExchangeStatus.ERROR) {
-			exchange.setStatus(ExchangeStatus.DONE);
-			channel.send(exchange);
-			return;
-		}
-		Object input = jaxbContext.createUnmarshaller().unmarshal(exchange.getMessage("in").getContent());
-		Method method = methodMap.get(input.getClass());
-		if (method ==  null) {
-			throw new IllegalStateException("Could not determine invoked web method");
-		}
-		boolean oneWay = method.getReturnType() == null;
-		Object output;
-		try {
-			output = method.invoke(proxy, new Object[] { input });
-		} catch (InvocationTargetException e) {
-			if (e.getCause() instanceof Exception) {
-				throw (Exception) e.getCause();
-			} else if (e.getCause() instanceof Error) {
-				throw (Error) e.getCause();
-			} else {
-				throw new RuntimeException(e.getCause());
-			}
-		}
-		if (oneWay) {
-			exchange.setStatus(ExchangeStatus.DONE);
-			channel.send(exchange);
-		} else {
-			NormalizedMessage msg = exchange.createMessage();
-			exchange.setMessage(msg, "out");
-			StringWriter writer = new StringWriter();
-			jaxbContext.createMarshaller().marshal(output, writer);
-			msg.setContent(new StringSource(writer.toString()));
-			channel.send(exchange);
-		}
-	}
-
-	public void start() throws Exception {
-	}
-
-	public void stop() throws Exception {
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * 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.apache.servicemix.sca;
+
+import java.io.StringWriter;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.jbi.component.ComponentContext;
+import javax.jbi.messaging.DeliveryChannel;
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.MessageExchange;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.jbi.messaging.MessageExchange.Role;
+import javax.jbi.servicedesc.ServiceEndpoint;
+import javax.xml.bind.JAXBContext;
+
+import org.apache.servicemix.common.Endpoint;
+import org.apache.servicemix.common.ExchangeProcessor;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.tuscany.core.invocation.spi.ProxyFactory;
+import org.apache.tuscany.model.assembly.ConfiguredReference;
+import org.apache.tuscany.model.assembly.ConfiguredService;
+import org.apache.tuscany.model.assembly.EntryPoint;
+import org.apache.tuscany.model.assembly.Interface;
+import org.apache.tuscany.model.types.InterfaceType;
+import org.apache.tuscany.model.types.OperationType;
+import org.apache.tuscany.model.types.java.JavaOperationType;
+
+/**
+ * 
+ * @author gnodet
+ * @version $Revision: 366467 $
+ * @org.apache.xbean.XBean element="endpoint"
+ *                  description="A sca endpoint"
+ * 
+ */
+public class ScaEndpoint extends Endpoint implements ExchangeProcessor {
+
+    protected ServiceEndpoint activated;
+    protected EntryPoint entryPoint;
+    protected Object proxy;
+    protected Map<Class, Method> methodMap;
+    protected JAXBContext jaxbContext;
+    protected DeliveryChannel channel;
+	
+	public ScaEndpoint(EntryPoint entryPoint) {
+		this.entryPoint = entryPoint;
+	}
+
+	public Role getRole() {
+		return Role.PROVIDER;
+	}
+
+	public void activate() throws Exception {
+        logger = this.serviceUnit.getComponent().getLogger();
+        ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
+        activated = ctx.activateEndpoint(service, endpoint);
+        channel = ctx.getDeliveryChannel();
+        // Get the target service
+        ConfiguredReference referenceValue = entryPoint.getConfiguredReference();
+        ConfiguredService targetServiceEndpoint = referenceValue.getConfiguredServices().get(0);
+        // Create a proxy
+        ProxyFactory proxyFactory = (ProxyFactory) targetServiceEndpoint.getProxyFactory();
+        proxy = proxyFactory.createProxy();
+        // Get the business interface
+        Interface targetInterface = targetServiceEndpoint.getService().getInterfaceContract();
+        InterfaceType targetInterfaceType = targetInterface.getInterfaceType();
+        List<Class> classes = new ArrayList<Class>();
+        methodMap = new HashMap<Class, Method>();
+        for (OperationType oper : targetInterfaceType.getOperationTypes()) {
+        	if (oper instanceof JavaOperationType) {
+        		Method mth = ((JavaOperationType) oper).getJavaMethod();
+        		Class[] params = mth.getParameterTypes();
+        		if (params.length != 1) {
+        			throw new IllegalStateException("Supports only methods with one parameter");
+        		}
+        		methodMap.put(params[0], mth);
+        		classes.add(mth.getReturnType());
+        		classes.add(params[0]);
+        	}
+        }
+        jaxbContext = JAXBContext.newInstance(classes.toArray(new Class[0]));
+	}
+
+	public void deactivate() throws Exception {
+        ServiceEndpoint ep = activated;
+        activated = null;
+        ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
+        ctx.deactivateEndpoint(ep);
+	}
+
+	public ExchangeProcessor getProcessor() {
+		return this;
+	}
+
+	public void process(MessageExchange exchange) throws Exception {
+		if (exchange.getStatus() == ExchangeStatus.DONE) {
+			return;
+		} else if (exchange.getStatus() == ExchangeStatus.ERROR) {
+			exchange.setStatus(ExchangeStatus.DONE);
+			channel.send(exchange);
+			return;
+		}
+		Object input = jaxbContext.createUnmarshaller().unmarshal(exchange.getMessage("in").getContent());
+		Method method = methodMap.get(input.getClass());
+		if (method ==  null) {
+			throw new IllegalStateException("Could not determine invoked web method");
+		}
+		boolean oneWay = method.getReturnType() == null;
+		Object output;
+		try {
+			output = method.invoke(proxy, new Object[] { input });
+		} catch (InvocationTargetException e) {
+			if (e.getCause() instanceof Exception) {
+				throw (Exception) e.getCause();
+			} else if (e.getCause() instanceof Error) {
+				throw (Error) e.getCause();
+			} else {
+				throw new RuntimeException(e.getCause());
+			}
+		}
+		if (oneWay) {
+			exchange.setStatus(ExchangeStatus.DONE);
+			channel.send(exchange);
+		} else {
+			NormalizedMessage msg = exchange.createMessage();
+			exchange.setMessage(msg, "out");
+			StringWriter writer = new StringWriter();
+			jaxbContext.createMarshaller().marshal(output, writer);
+			msg.setContent(new StringSource(writer.toString()));
+			channel.send(exchange);
+		}
+	}
+
+	public void start() throws Exception {
+	}
+
+	public void stop() throws Exception {
+	}
+
+}

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaEndpoint.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaLifeCycle.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaLifeCycle.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaLifeCycle.java (original)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaLifeCycle.java Tue Feb 21 15:40:05 2006
@@ -1,34 +1,34 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * 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.apache.servicemix.sca;
-
-import java.util.List;
-
-import org.apache.tuscany.common.discovery.util.ServiceProviderRegistry;
-import org.apache.tuscany.common.logging.LogProvider;
-import org.apache.servicemix.common.BaseComponent;
-import org.apache.servicemix.common.BaseLifeCycle;
-
-public class ScaLifeCycle extends BaseLifeCycle {
-
-	public ScaLifeCycle(BaseComponent component) {
-		super(component);
-		List l = ServiceProviderRegistry.getInstance().getServiceProviders(LogProvider.class);
-		l.clear();
-		l.add(new CommonsLoggingLogProvider());
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * 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.apache.servicemix.sca;
+
+import java.util.List;
+
+import org.apache.tuscany.common.discovery.util.ServiceProviderRegistry;
+import org.apache.tuscany.common.logging.LogProvider;
+import org.apache.servicemix.common.BaseComponent;
+import org.apache.servicemix.common.BaseLifeCycle;
+
+public class ScaLifeCycle extends BaseLifeCycle {
+
+	public ScaLifeCycle(BaseComponent component) {
+		super(component);
+		List l = ServiceProviderRegistry.getInstance().getServiceProviders(LogProvider.class);
+		l.clear();
+		l.add(new CommonsLoggingLogProvider());
+	}
+
+}

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaLifeCycle.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaServiceUnit.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaServiceUnit.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaServiceUnit.java (original)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaServiceUnit.java Tue Feb 21 15:40:05 2006
@@ -1,182 +1,182 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * 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.apache.servicemix.sca;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Iterator;
-
-import javax.wsdl.Definition;
-import javax.wsdl.Port;
-import javax.wsdl.Service;
-import javax.wsdl.factory.WSDLFactory;
-import javax.xml.namespace.QName;
-
-import org.apache.servicemix.common.ServiceUnit;
-import org.apache.tuscany.common.resource.loader.ResourceLoader;
-import org.apache.tuscany.common.resource.loader.ResourceLoaderFactory;
-import org.apache.tuscany.core.runtime.EventContext;
-import org.apache.tuscany.core.runtime.TuscanyModuleComponentContext;
-import org.apache.tuscany.core.runtime.config.ConfigurationLoader;
-import org.apache.tuscany.core.runtime.config.impl.EMFConfigurationLoader;
-import org.apache.tuscany.core.runtime.impl.EventContextImpl;
-import org.apache.tuscany.core.runtime.impl.TuscanyModuleComponentContextImpl;
-import org.apache.tuscany.core.runtime.scopes.DefaultScopeStrategy;
-import org.apache.tuscany.core.runtime.webapp.TuscanyWebAppRuntime;
-import org.apache.tuscany.model.assembly.AssemblyFactory;
-import org.apache.tuscany.model.assembly.AssemblyModelContext;
-import org.apache.tuscany.model.assembly.EntryPoint;
-import org.apache.tuscany.model.assembly.Module;
-import org.apache.tuscany.model.assembly.ModuleComponent;
-import org.apache.tuscany.model.assembly.impl.AssemblyFactoryImpl;
-import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl;
-import org.apache.tuscany.model.types.wsdl.WSDLTypeHelper;
-import org.osoa.sca.model.Binding;
-import org.osoa.sca.model.JbiBinding;
-import org.w3c.dom.Document;
-
-public class ScaServiceUnit extends ServiceUnit {
-
-	protected static final ThreadLocal<ScaServiceUnit> SERVICE_UNIT = new ThreadLocal<ScaServiceUnit>();
-	
-	public static ScaServiceUnit getCurrentScaServiceUnit() {
-		return SERVICE_UNIT.get();
-	}
-	
-	protected TuscanyWebAppRuntime tuscanyRuntime;
-	protected ClassLoader classLoader;
-	
-	public void init() throws Exception {
-		createScaRuntime();
-		createEndpoints();
-	}
-	
-	protected void createScaRuntime() throws Exception {
-		File root = new File(getRootPath());
-		File[] files = root.listFiles(new JarFileFilter());
-		URL[] urls = new URL[files.length + 1];
-		for (int i = 0; i < files.length; i++) {
-			urls[i] = files[i].toURL();
-		}
-		urls[urls.length - 1] = root.toURL();
-		classLoader = new URLClassLoader(urls, getClass().getClassLoader());
-        Thread.currentThread().setContextClassLoader(classLoader);
-		
-        ResourceLoader resourceLoader = ResourceLoaderFactory.getResourceLoader(classLoader);
-        AssemblyModelContext modelContext = new AssemblyModelContextImpl(resourceLoader);
-        ConfigurationLoader moduleComponentLoader = new EMFConfigurationLoader(modelContext);
-        ModuleComponent moduleComponent = moduleComponentLoader.loadModuleComponent(getName(), getName());
-        EventContext eventContext = new EventContextImpl();
-        DefaultScopeStrategy scopeStrategy = new DefaultScopeStrategy();
-        TuscanyModuleComponentContext moduleComponentContext = new TuscanyModuleComponentContextImpl(moduleComponent, eventContext, scopeStrategy, modelContext);
-        tuscanyRuntime = new TuscanyWebAppRuntime(moduleComponentContext);
-	}
-	
-	protected void createEndpoints() throws Exception {
-        AssemblyFactory assemblyFactory = new AssemblyFactoryImpl();
-        TuscanyModuleComponentContext moduleComponentContext = tuscanyRuntime.getModuleComponentContext(); 
-        Module module = moduleComponentContext.getModuleComponent().getModuleImplementation();
-        for (Iterator i = module.getEntryPoints().iterator(); i.hasNext();) {
-            EntryPoint entryPoint = (EntryPoint) i.next();
-            Binding binding = (Binding) entryPoint.getBindings().get(0);
-            if (binding instanceof JbiBinding) {
-                JbiBinding jbiBinding = (JbiBinding) binding;
-                Definition definition = null;
-                Document description = null;
-                QName serviceName = null;
-                QName interfaceName = null;
-                String endpointName = null;
-                QName qname = assemblyFactory.createQName(jbiBinding.getPort());
-                if (qname != null) {
-                	try {
-	                    WSDLTypeHelper typeHelper = moduleComponentContext.getAssemblyModelContext().getWSDLTypeHelper();
-	                    definition = typeHelper.getWSDLDefinition(qname.getNamespaceURI());
-	                    for (Iterator itSvc = definition.getServices().values().iterator(); itSvc.hasNext();) {
-	                    	Service svc = (Service) itSvc.next();
-	                    	if (svc.getQName().getNamespaceURI().equals(qname.getNamespaceURI())) {
-	                    		for (Iterator itPort = svc.getPorts().values().iterator(); itPort.hasNext();) {
-	                    			Port port = (Port) itPort.next();
-	                    			if (port.getName().equals(qname.getLocalPart())) {
-	                    				serviceName = svc.getQName();
-	                    				endpointName = port.getName();
-	                    				interfaceName = port.getBinding().getPortType().getQName();
-	                    			}
-	                    		}
-	                    	}
-	                    }
-	                    javax.wsdl.Binding b = definition.getBinding(qname);
-	                    description = WSDLFactory.newInstance().newWSDLWriter().getDocument(definition);
-                	} catch (Exception e) {
-                		// TODO warn
-                	}
-                	if (serviceName == null) {
-                		serviceName = new QName(qname.getNamespaceURI(), entryPoint.getName());
-                	}
-                	if (endpointName == null) {
-                		endpointName = qname.getLocalPart();
-                	}
-                }
-                ScaEndpoint endpoint = new ScaEndpoint(entryPoint);
-                endpoint.setServiceUnit(this);
-                endpoint.setService(serviceName);
-                endpoint.setEndpoint(endpointName);
-                endpoint.setInterfaceName(interfaceName);
-                endpoint.setDefinition(definition);
-                endpoint.setDescription(description);
-                addEndpoint(endpoint);
-            }
-        }
-	}
-	
-	private static class JarFileFilter implements FilenameFilter {
-        public boolean accept(File dir, String name) {
-            return name.endsWith(".jar");
-        }
-	}
-
-	public TuscanyWebAppRuntime getTuscanyRuntime() {
-		return tuscanyRuntime;
-	}
-
-	@Override
-	public void start() throws Exception {
-		tuscanyRuntime.start();
-		try {
-			SERVICE_UNIT.set(this);
-			tuscanyRuntime.getModuleComponentContext().start();
-			tuscanyRuntime.getModuleComponentContext().fireEvent(EventContext.MODULE_START, null);
-		} finally {
-			tuscanyRuntime.stop();
-			SERVICE_UNIT.set(null);
-		}
-		super.start();
-	}
-
-	@Override
-	public void stop() throws Exception {
-		super.stop();
-		tuscanyRuntime.start();
-		try {
-			tuscanyRuntime.getModuleComponentContext().fireEvent(EventContext.MODULE_STOP, null);
-			tuscanyRuntime.getModuleComponentContext().stop();
-		} finally {
-			tuscanyRuntime.stop();
-		}
-	}
-
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * 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.apache.servicemix.sca;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Iterator;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.factory.WSDLFactory;
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.common.ServiceUnit;
+import org.apache.tuscany.common.resource.loader.ResourceLoader;
+import org.apache.tuscany.common.resource.loader.ResourceLoaderFactory;
+import org.apache.tuscany.core.runtime.EventContext;
+import org.apache.tuscany.core.runtime.TuscanyModuleComponentContext;
+import org.apache.tuscany.core.runtime.config.ConfigurationLoader;
+import org.apache.tuscany.core.runtime.config.impl.EMFConfigurationLoader;
+import org.apache.tuscany.core.runtime.impl.EventContextImpl;
+import org.apache.tuscany.core.runtime.impl.TuscanyModuleComponentContextImpl;
+import org.apache.tuscany.core.runtime.scopes.DefaultScopeStrategy;
+import org.apache.tuscany.core.runtime.webapp.TuscanyWebAppRuntime;
+import org.apache.tuscany.model.assembly.AssemblyFactory;
+import org.apache.tuscany.model.assembly.AssemblyModelContext;
+import org.apache.tuscany.model.assembly.EntryPoint;
+import org.apache.tuscany.model.assembly.Module;
+import org.apache.tuscany.model.assembly.ModuleComponent;
+import org.apache.tuscany.model.assembly.impl.AssemblyFactoryImpl;
+import org.apache.tuscany.model.assembly.impl.AssemblyModelContextImpl;
+import org.apache.tuscany.model.types.wsdl.WSDLTypeHelper;
+import org.osoa.sca.model.Binding;
+import org.osoa.sca.model.JbiBinding;
+import org.w3c.dom.Document;
+
+public class ScaServiceUnit extends ServiceUnit {
+
+	protected static final ThreadLocal<ScaServiceUnit> SERVICE_UNIT = new ThreadLocal<ScaServiceUnit>();
+	
+	public static ScaServiceUnit getCurrentScaServiceUnit() {
+		return SERVICE_UNIT.get();
+	}
+	
+	protected TuscanyWebAppRuntime tuscanyRuntime;
+	protected ClassLoader classLoader;
+	
+	public void init() throws Exception {
+		createScaRuntime();
+		createEndpoints();
+	}
+	
+	protected void createScaRuntime() throws Exception {
+		File root = new File(getRootPath());
+		File[] files = root.listFiles(new JarFileFilter());
+		URL[] urls = new URL[files.length + 1];
+		for (int i = 0; i < files.length; i++) {
+			urls[i] = files[i].toURL();
+		}
+		urls[urls.length - 1] = root.toURL();
+		classLoader = new URLClassLoader(urls, getClass().getClassLoader());
+        Thread.currentThread().setContextClassLoader(classLoader);
+		
+        ResourceLoader resourceLoader = ResourceLoaderFactory.getResourceLoader(classLoader);
+        AssemblyModelContext modelContext = new AssemblyModelContextImpl(resourceLoader);
+        ConfigurationLoader moduleComponentLoader = new EMFConfigurationLoader(modelContext);
+        ModuleComponent moduleComponent = moduleComponentLoader.loadModuleComponent(getName(), getName());
+        EventContext eventContext = new EventContextImpl();
+        DefaultScopeStrategy scopeStrategy = new DefaultScopeStrategy();
+        TuscanyModuleComponentContext moduleComponentContext = new TuscanyModuleComponentContextImpl(moduleComponent, eventContext, scopeStrategy, modelContext);
+        tuscanyRuntime = new TuscanyWebAppRuntime(moduleComponentContext);
+	}
+	
+	protected void createEndpoints() throws Exception {
+        AssemblyFactory assemblyFactory = new AssemblyFactoryImpl();
+        TuscanyModuleComponentContext moduleComponentContext = tuscanyRuntime.getModuleComponentContext(); 
+        Module module = moduleComponentContext.getModuleComponent().getModuleImplementation();
+        for (Iterator i = module.getEntryPoints().iterator(); i.hasNext();) {
+            EntryPoint entryPoint = (EntryPoint) i.next();
+            Binding binding = (Binding) entryPoint.getBindings().get(0);
+            if (binding instanceof JbiBinding) {
+                JbiBinding jbiBinding = (JbiBinding) binding;
+                Definition definition = null;
+                Document description = null;
+                QName serviceName = null;
+                QName interfaceName = null;
+                String endpointName = null;
+                QName qname = assemblyFactory.createQName(jbiBinding.getPort());
+                if (qname != null) {
+                	try {
+	                    WSDLTypeHelper typeHelper = moduleComponentContext.getAssemblyModelContext().getWSDLTypeHelper();
+	                    definition = typeHelper.getWSDLDefinition(qname.getNamespaceURI());
+	                    for (Iterator itSvc = definition.getServices().values().iterator(); itSvc.hasNext();) {
+	                    	Service svc = (Service) itSvc.next();
+	                    	if (svc.getQName().getNamespaceURI().equals(qname.getNamespaceURI())) {
+	                    		for (Iterator itPort = svc.getPorts().values().iterator(); itPort.hasNext();) {
+	                    			Port port = (Port) itPort.next();
+	                    			if (port.getName().equals(qname.getLocalPart())) {
+	                    				serviceName = svc.getQName();
+	                    				endpointName = port.getName();
+	                    				interfaceName = port.getBinding().getPortType().getQName();
+	                    			}
+	                    		}
+	                    	}
+	                    }
+	                    javax.wsdl.Binding b = definition.getBinding(qname);
+	                    description = WSDLFactory.newInstance().newWSDLWriter().getDocument(definition);
+                	} catch (Exception e) {
+                		// TODO warn
+                	}
+                	if (serviceName == null) {
+                		serviceName = new QName(qname.getNamespaceURI(), entryPoint.getName());
+                	}
+                	if (endpointName == null) {
+                		endpointName = qname.getLocalPart();
+                	}
+                }
+                ScaEndpoint endpoint = new ScaEndpoint(entryPoint);
+                endpoint.setServiceUnit(this);
+                endpoint.setService(serviceName);
+                endpoint.setEndpoint(endpointName);
+                endpoint.setInterfaceName(interfaceName);
+                endpoint.setDefinition(definition);
+                endpoint.setDescription(description);
+                addEndpoint(endpoint);
+            }
+        }
+	}
+	
+	private static class JarFileFilter implements FilenameFilter {
+        public boolean accept(File dir, String name) {
+            return name.endsWith(".jar");
+        }
+	}
+
+	public TuscanyWebAppRuntime getTuscanyRuntime() {
+		return tuscanyRuntime;
+	}
+
+	@Override
+	public void start() throws Exception {
+		tuscanyRuntime.start();
+		try {
+			SERVICE_UNIT.set(this);
+			tuscanyRuntime.getModuleComponentContext().start();
+			tuscanyRuntime.getModuleComponentContext().fireEvent(EventContext.MODULE_START, null);
+		} finally {
+			tuscanyRuntime.stop();
+			SERVICE_UNIT.set(null);
+		}
+		super.start();
+	}
+
+	@Override
+	public void stop() throws Exception {
+		super.stop();
+		tuscanyRuntime.start();
+		try {
+			tuscanyRuntime.getModuleComponentContext().fireEvent(EventContext.MODULE_STOP, null);
+			tuscanyRuntime.getModuleComponentContext().stop();
+		} finally {
+			tuscanyRuntime.stop();
+		}
+	}
+
+}

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/ScaServiceUnit.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/JbiAssemblyFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/JbiBinding.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/JbiBinding.java?rev=379627&r1=379626&r2=379627&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/JbiBinding.java (original)
+++ incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/JbiBinding.java Tue Feb 21 15:40:05 2006
@@ -1,25 +1,25 @@
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * 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.apache.servicemix.sca.assembly;
-
-import org.apache.tuscany.model.assembly.Binding;
-
-public interface JbiBinding extends Binding {
-
-	void setPort(String port);
-	
-	String getPort();
-}
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * 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.apache.servicemix.sca.assembly;
+
+import org.apache.tuscany.model.assembly.Binding;
+
+public interface JbiBinding extends Binding {
+
+	void setPort(String port);
+	
+	String getPort();
+}

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/JbiBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/impl/JbiAssemblyFactoryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/impl/JbiBindingImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/DocumentRoot.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/JbiAssemblyFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/JbiAssemblyPackage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/DocumentRootImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyFactoryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiAssemblyPackageImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/servicemix/trunk/servicemix-sca/src/main/java/org/apache/servicemix/sca/assembly/sdo/impl/JbiBindingImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native