You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2008/10/27 17:38:18 UTC

svn commit: r708234 - in /tuscany/branches/sca-equinox: distribution/pdetarget/ modules/contribution/src/main/resources/META-INF/services/ modules/extensibility/ modules/extensibility/src/main/java/org/apache/tuscany/sca/core/ modules/extensibility/src...

Author: rfeng
Date: Mon Oct 27 09:38:16 2008
New Revision: 708234

URL: http://svn.apache.org/viewvc?rev=708234&view=rev
Log:
Bring up calculator-osgi using equinox run config

Added:
    tuscany/branches/sca-equinox/modules/contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory
    tuscany/branches/sca-equinox/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.NodeFactory   (props changed)
      - copied unchanged from r707769, tuscany/branches/sca-equinox/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/J2SE-1.5.profile
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/JavaSE-1.6.profile
Removed:
    tuscany/branches/sca-equinox/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANode2Factory
    tuscany/branches/sca-equinox/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory
Modified:
    tuscany/branches/sca-equinox/distribution/pdetarget/pom.xml
    tuscany/branches/sca-equinox/modules/extensibility/pom.xml
    tuscany/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/DefaultFactoryExtensionPoint.java
    tuscany/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java
    tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
    tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
    tuscany/branches/sca-equinox/samples/calculator-osgi/src/main/java/calculator/CalculatorActivator.java
    tuscany/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ModuleBundlesBuildMojo.java

Modified: tuscany/branches/sca-equinox/distribution/pdetarget/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/distribution/pdetarget/pom.xml?rev=708234&r1=708233&r2=708234&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/distribution/pdetarget/pom.xml (original)
+++ tuscany/branches/sca-equinox/distribution/pdetarget/pom.xml Mon Oct 27 09:38:16 2008
@@ -1,185 +1,186 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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>
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.apache.tuscany.sca</groupId>
-        <artifactId>tuscany-distribution</artifactId>
-        <version>1.4-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
-    </parent>
-
-    <artifactId>tuscany-distribution-pdetarget</artifactId>
-    <name>Apache Tuscany SCA PDE Target Platform Distribution</name>
-    <packaging>pom</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-distribution-all</artifactId>
-            <type>pom</type>
-            <version>1.4-SNAPSHOT</version>
-        </dependency>
-    </dependencies>
-
-    <profiles>
-    
-        <!-- Build profile that can be used to configure your Eclipse environment -->
-        <profile>
-            <id>eclipse</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.tuscany.sca</groupId>
-                        <artifactId>tuscany-maven-bundle-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <id>distribution-modules</id>
-                                <phase>generate-resources</phase>
-                                <goals>
-                                    <goal>generate-modules</goal>
-                                </goals>
-                                <configuration>
-                                    <targetDirectory>target/modules</targetDirectory>
-                                    <excludeGroupIds>
-                                        <excludeGroupId>org.apache.tuscany.sca</excludeGroupId>
-                                    </excludeGroupIds>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-        <!-- Profile that can be used to build the modules included in the distro -->
-        <profile>
-            <id>modules</id>
-            <modules>
-                <module>../../../modules/assembly</module>
-                <module>../../../modules/assembly-xml</module>
-                <module>../../../modules/assembly-xsd</module>
-                <module>../../../modules/binding-atom</module>
-                <module>../../../modules/binding-atom-abdera</module>
-                <module>../../../modules/binding-corba</module>
-                <module>../../../modules/binding-corba-runtime</module>
-                <module>../../../modules/binding-ejb</module>
-                <module>../../../modules/binding-ejb-runtime</module>
-                <module>../../../modules/binding-gdata</module>
-                <module>../../../modules/binding-gdata-gsoc</module>
-                <module>../../../modules/binding-gdata-runtime</module>
-                <module>../../../modules/binding-gdata-runtime-gsoc</module>
-                <module>../../../modules/binding-http</module>
-                <module>../../../modules/binding-http-runtime</module>
-                <module>../../../modules/binding-jms</module>
-                <module>../../../modules/binding-jms-runtime</module>
-                <module>../../../modules/binding-jsonrpc</module>
-                <module>../../../modules/binding-jsonrpc-runtime</module>
-                <module>../../../modules/binding-rmi</module>
-                <module>../../../modules/binding-rmi-runtime</module>
-                <module>../../../modules/binding-rss</module>
-                <module>../../../modules/binding-rss-rome</module>
-                <module>../../../modules/binding-sca</module>
-                <module>../../../modules/binding-sca-axis2</module>
-                <module>../../../modules/binding-sca-xml</module>
-                <module>../../../modules/binding-ws</module>
-                <module>../../../modules/binding-ws-axis2</module>
-                <module>../../../modules/binding-ws-axis2-policy</module>
-                <module>../../../modules/binding-ws-wsdlgen</module>
-                <module>../../../modules/binding-ws-xml</module>
-                <module>../../../modules/contribution</module>
-                <module>../../../modules/contribution-java</module>
-                <module>../../../modules/contribution-namespace</module>
-                <module>../../../modules/contribution-resource</module>
-                <module>../../../modules/contribution-xml</module>
-                <module>../../../modules/core</module>
-                <module>../../../modules/core-databinding</module>
-                <module>../../../modules/core-spi</module>
-                <module>../../../modules/data-api</module>
-                <module>../../../modules/databinding</module>
-                <module>../../../modules/databinding-axiom</module>
-                <module>../../../modules/databinding-fastinfoset</module>
-                <module>../../../modules/databinding-jaxb</module>
-                <module>../../../modules/databinding-jaxb-axiom</module>
-                <module>../../../modules/databinding-json</module>
-                <module>../../../modules/databinding-saxon</module>
-                <module>../../../modules/databinding-sdo</module>
-                <module>../../../modules/databinding-sdo-axiom</module>
-                <module>../../../modules/databinding-xmlbeans</module>
-                <module>../../../modules/definitions</module>
-                <module>../../../modules/definitions-xml</module>
-                <module>../../../modules/domain-manager</module>
-                <module>../../../modules/endpoint</module>
-                <module>../../../modules/extensibility</module>
-                <module>../../../modules/extensibility-equinox</module>
-                <module>../../../modules/host-corba</module>
-                <module>../../../modules/host-corba-jee</module>
-                <module>../../../modules/host-corba-jse</module>
-                <module>../../../modules/host-http</module>
-                <module>../../../modules/host-jetty</module>
-                <module>../../../modules/host-rmi</module>
-                <module>../../../modules/implementation-bpel</module>
-                <module>../../../modules/implementation-bpel-ode</module>
-                <module>../../../modules/implementation-ejb</module>
-                <module>../../../modules/implementation-java</module>
-                <module>../../../modules/implementation-java-runtime</module>
-                <module>../../../modules/implementation-java-xml</module>
-                <module>../../../modules/implementation-node</module>
-                <module>../../../modules/implementation-node-runtime</module>
-                <module>../../../modules/implementation-resource</module>
-                <module>../../../modules/implementation-resource-runtime</module>
-                <module>../../../modules/implementation-script</module>
-                <module>../../../modules/implementation-script-runtime</module>
-                <module>../../../modules/implementation-spring</module>
-                <module>../../../modules/implementation-widget</module>
-                <module>../../../modules/implementation-widget-runtime</module>
-                <module>../../../modules/implementation-xquery</module>
-                <module>../../../modules/interface</module>
-                <module>../../../modules/interface-java</module>
-                <module>../../../modules/interface-java-jaxws</module>
-                <module>../../../modules/interface-java-xml</module>
-                <module>../../../modules/interface-wsdl</module>
-                <module>../../../modules/interface-wsdl-xml</module>
-                <module>../../../modules/monitor</module>
-                <module>../../../modules/node-api</module>
-                <module>../../../modules/node-impl</module>
-                <module>../../../modules/node-launcher</module>
-                <module>../../../modules/node-launcher-equinox</module>
-                <module>../../../modules/node-launcher-webapp</module>
-                <module>../../../modules/node-manager</module>
-                <module>../../../modules/policy</module>
-                <module>../../../modules/policy-security</module>
-                <module>../../../modules/policy-security-jsr250</module>
-                <module>../../../modules/policy-security-ws</module>
-                <module>../../../modules/policy-transaction</module>
-                <module>../../../modules/policy-xml</module>
-                <module>../../../modules/policy-xml-ws</module>
-                <module>../../../modules/sca-api</module>
-                <module>../../../modules/tracing-aspectj</module>
-                <module>../../../modules/workspace</module>
-                <module>../../../modules/workspace-impl</module>
-                <module>../../../modules/workspace-xml</module>
-                <module>../../../modules/xsd</module>
-                <module>../../../modules/xsd-xml</module>
-            </modules>
-        </profile>
-    </profiles>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-distribution</artifactId>
+        <version>1.4-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>tuscany-distribution-pdetarget</artifactId>
+    <name>Apache Tuscany SCA PDE Target Platform Distribution</name>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-distribution-all</artifactId>
+            <type>pom</type>
+            <version>1.4-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+    <profiles>
+    
+        <!-- Build profile that can be used to configure your Eclipse environment -->
+        <profile>
+            <id>eclipse</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.tuscany.sca</groupId>
+                        <artifactId>tuscany-maven-bundle-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>distribution-modules</id>
+                                <phase>generate-resources</phase>
+                                <goals>
+                                    <goal>generate-modules</goal>
+                                </goals>
+                                <configuration>
+                                    <targetDirectory>target/modules</targetDirectory>
+                                    <generateTargetPlatform>true</generateTargetPlatform>
+                                    <excludeGroupIds>
+                                        <excludeGroupId>org.apache.tuscany.sca</excludeGroupId>
+                                    </excludeGroupIds>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <!-- Profile that can be used to build the modules included in the distro -->
+        <profile>
+            <id>modules</id>
+            <modules>
+                <module>../../../modules/assembly</module>
+                <module>../../../modules/assembly-xml</module>
+                <module>../../../modules/assembly-xsd</module>
+                <module>../../../modules/binding-atom</module>
+                <module>../../../modules/binding-atom-abdera</module>
+                <module>../../../modules/binding-corba</module>
+                <module>../../../modules/binding-corba-runtime</module>
+                <module>../../../modules/binding-ejb</module>
+                <module>../../../modules/binding-ejb-runtime</module>
+                <module>../../../modules/binding-gdata</module>
+                <module>../../../modules/binding-gdata-gsoc</module>
+                <module>../../../modules/binding-gdata-runtime</module>
+                <module>../../../modules/binding-gdata-runtime-gsoc</module>
+                <module>../../../modules/binding-http</module>
+                <module>../../../modules/binding-http-runtime</module>
+                <module>../../../modules/binding-jms</module>
+                <module>../../../modules/binding-jms-runtime</module>
+                <module>../../../modules/binding-jsonrpc</module>
+                <module>../../../modules/binding-jsonrpc-runtime</module>
+                <module>../../../modules/binding-rmi</module>
+                <module>../../../modules/binding-rmi-runtime</module>
+                <module>../../../modules/binding-rss</module>
+                <module>../../../modules/binding-rss-rome</module>
+                <module>../../../modules/binding-sca</module>
+                <module>../../../modules/binding-sca-axis2</module>
+                <module>../../../modules/binding-sca-xml</module>
+                <module>../../../modules/binding-ws</module>
+                <module>../../../modules/binding-ws-axis2</module>
+                <module>../../../modules/binding-ws-axis2-policy</module>
+                <module>../../../modules/binding-ws-wsdlgen</module>
+                <module>../../../modules/binding-ws-xml</module>
+                <module>../../../modules/contribution</module>
+                <module>../../../modules/contribution-java</module>
+                <module>../../../modules/contribution-namespace</module>
+                <module>../../../modules/contribution-resource</module>
+                <module>../../../modules/contribution-xml</module>
+                <module>../../../modules/core</module>
+                <module>../../../modules/core-databinding</module>
+                <module>../../../modules/core-spi</module>
+                <module>../../../modules/data-api</module>
+                <module>../../../modules/databinding</module>
+                <module>../../../modules/databinding-axiom</module>
+                <module>../../../modules/databinding-fastinfoset</module>
+                <module>../../../modules/databinding-jaxb</module>
+                <module>../../../modules/databinding-jaxb-axiom</module>
+                <module>../../../modules/databinding-json</module>
+                <module>../../../modules/databinding-saxon</module>
+                <module>../../../modules/databinding-sdo</module>
+                <module>../../../modules/databinding-sdo-axiom</module>
+                <module>../../../modules/databinding-xmlbeans</module>
+                <module>../../../modules/definitions</module>
+                <module>../../../modules/definitions-xml</module>
+                <module>../../../modules/domain-manager</module>
+                <module>../../../modules/endpoint</module>
+                <module>../../../modules/extensibility</module>
+                <module>../../../modules/extensibility-equinox</module>
+                <module>../../../modules/host-corba</module>
+                <module>../../../modules/host-corba-jee</module>
+                <module>../../../modules/host-corba-jse</module>
+                <module>../../../modules/host-http</module>
+                <module>../../../modules/host-jetty</module>
+                <module>../../../modules/host-rmi</module>
+                <module>../../../modules/implementation-bpel</module>
+                <module>../../../modules/implementation-bpel-ode</module>
+                <module>../../../modules/implementation-ejb</module>
+                <module>../../../modules/implementation-java</module>
+                <module>../../../modules/implementation-java-runtime</module>
+                <module>../../../modules/implementation-java-xml</module>
+                <module>../../../modules/implementation-node</module>
+                <module>../../../modules/implementation-node-runtime</module>
+                <module>../../../modules/implementation-resource</module>
+                <module>../../../modules/implementation-resource-runtime</module>
+                <module>../../../modules/implementation-script</module>
+                <module>../../../modules/implementation-script-runtime</module>
+                <module>../../../modules/implementation-spring</module>
+                <module>../../../modules/implementation-widget</module>
+                <module>../../../modules/implementation-widget-runtime</module>
+                <module>../../../modules/implementation-xquery</module>
+                <module>../../../modules/interface</module>
+                <module>../../../modules/interface-java</module>
+                <module>../../../modules/interface-java-jaxws</module>
+                <module>../../../modules/interface-java-xml</module>
+                <module>../../../modules/interface-wsdl</module>
+                <module>../../../modules/interface-wsdl-xml</module>
+                <module>../../../modules/monitor</module>
+                <module>../../../modules/node-api</module>
+                <module>../../../modules/node-impl</module>
+                <module>../../../modules/node-launcher</module>
+                <module>../../../modules/node-launcher-equinox</module>
+                <module>../../../modules/node-launcher-webapp</module>
+                <module>../../../modules/node-manager</module>
+                <module>../../../modules/policy</module>
+                <module>../../../modules/policy-security</module>
+                <module>../../../modules/policy-security-jsr250</module>
+                <module>../../../modules/policy-security-ws</module>
+                <module>../../../modules/policy-transaction</module>
+                <module>../../../modules/policy-xml</module>
+                <module>../../../modules/policy-xml-ws</module>
+                <module>../../../modules/sca-api</module>
+                <module>../../../modules/tracing-aspectj</module>
+                <module>../../../modules/workspace</module>
+                <module>../../../modules/workspace-impl</module>
+                <module>../../../modules/workspace-xml</module>
+                <module>../../../modules/xsd</module>
+                <module>../../../modules/xsd-xml</module>
+            </modules>
+        </profile>
+    </profiles>
+
+</project>

Added: tuscany/branches/sca-equinox/modules/contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory?rev=708234&view=auto
==============================================================================
--- tuscany/branches/sca-equinox/modules/contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory (added)
+++ tuscany/branches/sca-equinox/modules/contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory Mon Oct 27 09:38:16 2008
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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. 
+org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory
\ No newline at end of file

Modified: tuscany/branches/sca-equinox/modules/extensibility/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/extensibility/pom.xml?rev=708234&r1=708233&r2=708234&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/extensibility/pom.xml (original)
+++ tuscany/branches/sca-equinox/modules/extensibility/pom.xml Mon Oct 27 09:38:16 2008
@@ -44,6 +44,7 @@
                             org.apache.tuscany.sca.core,
                             org.apache.tuscany.sca.extensibility
                         </Export-Package>
+                        <DynamicImport-Package>org.apache.tuscany.sca.extensibility.equinox</DynamicImport-Package>
                     </instructions>
                 </configuration>
             </plugin>

Modified: tuscany/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/DefaultFactoryExtensionPoint.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/DefaultFactoryExtensionPoint.java?rev=708234&r1=708233&r2=708234&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/DefaultFactoryExtensionPoint.java (original)
+++ tuscany/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/DefaultFactoryExtensionPoint.java Mon Oct 27 09:38:16 2008
@@ -20,6 +20,10 @@
 package org.apache.tuscany.sca.core;
 
 import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.HashMap;
 
 import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
@@ -81,6 +85,24 @@
         }
     }
     
+    private ClassLoader getContextClassLoader() {
+        return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+            public ClassLoader run() {
+                return Thread.currentThread().getContextClassLoader();
+            }
+        });
+    }
+
+    private ClassLoader setContextClassLoader(final ClassLoader classLoader) {
+        return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+            public ClassLoader run() {
+                ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+                Thread.currentThread().setContextClassLoader(classLoader);
+                return tccl;
+            }
+        });
+    }
+
     /**
      * Get a factory implementing the given interface.
      * @param factoryInterface The lookup key (factory interface)
@@ -96,8 +118,22 @@
                     ServiceDiscovery.getInstance().getFirstServiceDeclaration(factoryInterface.getName());
                 if (factoryDeclaration != null) {
                     Class<?> factoryClass = factoryDeclaration.loadClass();
-
                     try {
+                        if (!factoryInterface.isInterface() && Modifier.isAbstract(factoryInterface.getModifiers())) {
+                            try {
+                                Method newInstanceMethod = factoryInterface.getDeclaredMethod("newInstance");
+                                ClassLoader tccl = setContextClassLoader(factoryClass.getClassLoader());
+                                try {
+                                    factory = newInstanceMethod.invoke(null);
+                                    factories.put(factoryInterface, factory);
+                                    return  factoryInterface.cast(factory);
+                                } finally {
+                                    setContextClassLoader(tccl);
+                                }
+                            } catch (NoSuchMethodException e) {
+                                // Ignore
+                            }
+                        }
                         // Default empty constructor
                         Constructor<?> constructor = factoryClass.getConstructor();
                         factory = constructor.newInstance();
@@ -114,7 +150,7 @@
                     }
 
                     // Cache the loaded factory
-                    addFactory(factory);
+                    factories.put(factoryInterface, factory);
                 }
             } catch (Exception e) {
                 throw new IllegalArgumentException(e);

Modified: tuscany/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java?rev=708234&r1=708233&r2=708234&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java (original)
+++ tuscany/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/extensibility/ServiceDiscovery.java Mon Oct 27 09:38:16 2008
@@ -37,7 +37,10 @@
     private final static ServiceDiscovery INSTANCE = new ServiceDiscovery();
 
     private ServiceDiscoverer discoverer;
-
+    
+    private ServiceDiscovery() {
+        super();
+    }
     /**
      * Get an instance of Service discovery, one instance is created per
      * ClassLoader that this class is loaded from
@@ -49,9 +52,19 @@
     }
 
     public ServiceDiscoverer getServiceDiscoverer() {
-        if (discoverer == null) {
-            discoverer = new ContextClassLoaderServiceDiscoverer();
+        if (discoverer != null) {
+            return discoverer;
+        }
+        try {
+            Class<?> cls = Class.forName("org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer");
+            System.out.println(cls);
+            if (discoverer != null) {
+                return discoverer;
+            }
+        } catch (Throwable e) {
+            e.printStackTrace();
         }
+        discoverer = new ContextClassLoaderServiceDiscoverer();
         return discoverer;
     }
 

Modified: tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java?rev=708234&r1=708233&r2=708234&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java (original)
+++ tuscany/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java Mon Oct 27 09:38:16 2008
@@ -263,8 +263,13 @@
         // Initialize the Tuscany module activators
         ModuleActivatorExtensionPoint activators = extensionPoints.getExtensionPoint(ModuleActivatorExtensionPoint.class);
         for (ModuleActivator moduleActivator: activators.getModuleActivators()) {
-            moduleActivator.start(extensionPoints);
-            moduleActivators.add(moduleActivator);
+            try {
+                moduleActivator.start(extensionPoints);
+                moduleActivators.add(moduleActivator);
+            } catch (Throwable e) {
+                // Ignore the failing module for now
+                logger.log(Level.SEVERE, e.getMessage(), e);
+            }
         }
 
         // Get XML input/output factories

Propchange: tuscany/branches/sca-equinox/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.NodeFactory
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Oct 27 09:38:16 2008
@@ -0,0 +1,2 @@
+/tuscany/branches/sca-java-1.3/modules/node2-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory:671193,680620-680628
+/tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.node.SCANodeFactory:694837-694843,694855

Modified: tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java?rev=708234&r1=708233&r2=708234&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java (original)
+++ tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java Mon Oct 27 09:38:16 2008
@@ -36,6 +36,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -122,12 +123,19 @@
         try {
             if (!EclipseStarter.isRunning()) {
 
+                String version = System.getProperty("java.specification.version");
+                String profile = "J2SE-1.5.profile";
+                if (version.startsWith("1.6")) {
+                    profile = "JavaSE-1.6.profile";
+                }
+                Properties props = new Properties();
+                InputStream is = getClass().getResourceAsStream(profile);
+                if (is != null) {
+                    props.load(is);
+                    is.close();
+                }
                 // Configure Eclipse properties
-                Map<Object, Object> props = new HashMap<Object, Object>();
                 
-                // Set system packages
-                props.put("org.osgi.framework.system.packages", systemPackages);
-    
                 // Use the boot classloader as the parent classloader
                 props.put("osgi.contextClassLoaderParent", "boot");
                 

Added: tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/J2SE-1.5.profile
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/J2SE-1.5.profile?rev=708234&view=auto
==============================================================================
--- tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/J2SE-1.5.profile (added)
+++ tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/J2SE-1.5.profile Mon Oct 27 09:38:16 2008
@@ -0,0 +1,150 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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. 
+org.osgi.framework.system.packages = \
+ javax.accessibility,\
+ javax.activity,\
+ javax.crypto,\
+ javax.crypto.interfaces,\
+ javax.crypto.spec,\
+ javax.imageio,\
+ javax.imageio.event,\
+ javax.imageio.metadata,\
+ javax.imageio.plugins.bmp,\
+ javax.imageio.plugins.jpeg,\
+ javax.imageio.spi,\
+ javax.imageio.stream,\
+ javax.management,\
+ javax.management.loading,\
+ javax.management.modelmbean,\
+ javax.management.monitor,\
+ javax.management.openmbean,\
+ javax.management.relation,\
+ javax.management.remote,\
+ javax.management.remote.rmi,\
+ javax.management.timer,\
+ javax.naming,\
+ javax.naming.directory,\
+ javax.naming.event,\
+ javax.naming.ldap,\
+ javax.naming.spi,\
+ javax.net,\
+ javax.net.ssl,\
+ javax.print,\
+ javax.print.attribute,\
+ javax.print.attribute.standard,\
+ javax.print.event,\
+ javax.rmi,\
+ javax.rmi.CORBA,\
+ javax.rmi.ssl,\
+ javax.security.auth,\
+ javax.security.auth.callback,\
+ javax.security.auth.kerberos,\
+ javax.security.auth.login,\
+ javax.security.auth.spi,\
+ javax.security.auth.x500,\
+ javax.security.cert,\
+ javax.security.sasl,\
+ javax.sound.midi,\
+ javax.sound.midi.spi,\
+ javax.sound.sampled,\
+ javax.sound.sampled.spi,\
+ javax.sql,\
+ javax.sql.rowset,\
+ javax.sql.rowset.serial,\
+ javax.sql.rowset.spi,\
+ javax.swing,\
+ javax.swing.border,\
+ javax.swing.colorchooser,\
+ javax.swing.event,\
+ javax.swing.filechooser,\
+ javax.swing.plaf,\
+ javax.swing.plaf.basic,\
+ javax.swing.plaf.metal,\
+ javax.swing.plaf.multi,\
+ javax.swing.plaf.synth,\
+ javax.swing.table,\
+ javax.swing.text,\
+ javax.swing.text.html,\
+ javax.swing.text.html.parser,\
+ javax.swing.text.rtf,\
+ javax.swing.tree,\
+ javax.swing.undo,\
+ javax.transaction,\
+ javax.transaction.xa,\
+ javax.xml,\
+ javax.xml.datatype,\
+ javax.xml.namespace,\
+ javax.xml.parsers,\
+ javax.xml.transform,\
+ javax.xml.transform.dom,\
+ javax.xml.transform.sax,\
+ javax.xml.transform.stream,\
+ javax.xml.validation,\
+ javax.xml.xpath,\
+ org.ietf.jgss,\
+ org.omg.CORBA,\
+ org.omg.CORBA_2_3,\
+ org.omg.CORBA_2_3.portable,\
+ org.omg.CORBA.DynAnyPackage,\
+ org.omg.CORBA.ORBPackage,\
+ org.omg.CORBA.portable,\
+ org.omg.CORBA.TypeCodePackage,\
+ org.omg.CosNaming,\
+ org.omg.CosNaming.NamingContextExtPackage,\
+ org.omg.CosNaming.NamingContextPackage,\
+ org.omg.Dynamic,\
+ org.omg.DynamicAny,\
+ org.omg.DynamicAny.DynAnyFactoryPackage,\
+ org.omg.DynamicAny.DynAnyPackage,\
+ org.omg.IOP,\
+ org.omg.IOP.CodecFactoryPackage,\
+ org.omg.IOP.CodecPackage,\
+ org.omg.Messaging,\
+ org.omg.PortableInterceptor,\
+ org.omg.PortableInterceptor.ORBInitInfoPackage,\
+ org.omg.PortableServer,\
+ org.omg.PortableServer.CurrentPackage,\
+ org.omg.PortableServer.POAManagerPackage,\
+ org.omg.PortableServer.POAPackage,\
+ org.omg.PortableServer.portable,\
+ org.omg.PortableServer.ServantLocatorPackage,\
+ org.omg.SendingContext,\
+ org.omg.stub.java.rmi,\
+ org.w3c.dom,\
+ org.w3c.dom.bootstrap,\
+ org.w3c.dom.events,\
+ org.w3c.dom.ls,\
+ org.xml.sax,\
+ org.xml.sax.ext,\
+ org.xml.sax.helpers
+org.osgi.framework.bootdelegation = \
+ javax.*,\
+ org.ietf.jgss,\
+ org.omg.*,\
+ org.w3c.*,\
+ org.xml.*,\
+ sun.*,\
+ com.sun.*
+org.osgi.framework.executionenvironment = \
+ OSGi/Minimum-1.0,\
+ OSGi/Minimum-1.1,\
+ JRE-1.1,\
+ J2SE-1.2,\
+ J2SE-1.3,\
+ J2SE-1.4,\
+ J2SE-1.5
+osgi.java.profile.name = J2SE-1.5

Added: tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/JavaSE-1.6.profile
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/JavaSE-1.6.profile?rev=708234&view=auto
==============================================================================
--- tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/JavaSE-1.6.profile (added)
+++ tuscany/branches/sca-equinox/modules/node-launcher-equinox/src/main/resources/org/apache/tuscany/sca/node/equinox/launcher/JavaSE-1.6.profile Mon Oct 27 09:38:16 2008
@@ -0,0 +1,185 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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. 
+org.osgi.framework.system.packages = \
+ javax.accessibility,\
+ javax.activation,\
+ javax.activity,\
+ javax.annotation,\
+ javax.annotation.processing,\
+ javax.crypto,\
+ javax.crypto.interfaces,\
+ javax.crypto.spec,\
+ javax.imageio,\
+ javax.imageio.event,\
+ javax.imageio.metadata,\
+ javax.imageio.plugins.bmp,\
+ javax.imageio.plugins.jpeg,\
+ javax.imageio.spi,\
+ javax.imageio.stream,\
+ javax.jws,\
+ javax.jws.soap,\
+ javax.lang.model,\
+ javax.lang.model.element,\
+ javax.lang.model.type,\
+ javax.lang.model.util,\
+ javax.management,\
+ javax.management.loading,\
+ javax.management.modelmbean,\
+ javax.management.monitor,\
+ javax.management.openmbean,\
+ javax.management.relation,\
+ javax.management.remote,\
+ javax.management.remote.rmi,\
+ javax.management.timer,\
+ javax.naming,\
+ javax.naming.directory,\
+ javax.naming.event,\
+ javax.naming.ldap,\
+ javax.naming.spi,\
+ javax.net,\
+ javax.net.ssl,\
+ javax.print,\
+ javax.print.attribute,\
+ javax.print.attribute.standard,\
+ javax.print.event,\
+ javax.rmi,\
+ javax.rmi.CORBA,\
+ javax.rmi.ssl,\
+ javax.script,\
+ javax.security.auth,\
+ javax.security.auth.callback,\
+ javax.security.auth.kerberos,\
+ javax.security.auth.login,\
+ javax.security.auth.spi,\
+ javax.security.auth.x500,\
+ javax.security.cert,\
+ javax.security.sasl,\
+ javax.sound.midi,\
+ javax.sound.midi.spi,\
+ javax.sound.sampled,\
+ javax.sound.sampled.spi,\
+ javax.sql,\
+ javax.sql.rowset,\
+ javax.sql.rowset.serial,\
+ javax.sql.rowset.spi,\
+ javax.swing,\
+ javax.swing.border,\
+ javax.swing.colorchooser,\
+ javax.swing.event,\
+ javax.swing.filechooser,\
+ javax.swing.plaf,\
+ javax.swing.plaf.basic,\
+ javax.swing.plaf.metal,\
+ javax.swing.plaf.multi,\
+ javax.swing.plaf.synth,\
+ javax.swing.table,\
+ javax.swing.text,\
+ javax.swing.text.html,\
+ javax.swing.text.html.parser,\
+ javax.swing.text.rtf,\
+ javax.swing.tree,\
+ javax.swing.undo,\
+ javax.tools,\
+ javax.transaction,\
+ javax.transaction.xa,\
+ javax.xml,\
+ javax.xml.bind,\
+ javax.xml.bind.annotation,\
+ javax.xml.bind.annotation.adapters,\
+ javax.xml.bind.attachment,\
+ javax.xml.bind.helpers,\
+ javax.xml.bind.util,\
+ javax.xml.crypto,\
+ javax.xml.crypto.dom,\
+ javax.xml.crypto.dsig,\
+ javax.xml.crypto.dsig.dom,\
+ javax.xml.crypto.dsig.keyinfo,\
+ javax.xml.crypto.dsig.spec,\
+ javax.xml.datatype,\
+ javax.xml.namespace,\
+ javax.xml.parsers,\
+ javax.xml.soap,\
+ javax.xml.stream,\
+ javax.xml.stream.events,\
+ javax.xml.stream.util,\
+ javax.xml.transform,\
+ javax.xml.transform.dom,\
+ javax.xml.transform.sax,\
+ javax.xml.transform.stax,\
+ javax.xml.transform.stream,\
+ javax.xml.validation,\
+ javax.xml.ws,\
+ javax.xml.ws.handler,\
+ javax.xml.ws.handler.soap,\
+ javax.xml.ws.http,\
+ javax.xml.ws.soap,\
+ javax.xml.ws.spi,\
+ javax.xml.xpath,\
+ org.ietf.jgss,\
+ org.omg.CORBA,\
+ org.omg.CORBA_2_3,\
+ org.omg.CORBA_2_3.portable,\
+ org.omg.CORBA.DynAnyPackage,\
+ org.omg.CORBA.ORBPackage,\
+ org.omg.CORBA.portable,\
+ org.omg.CORBA.TypeCodePackage,\
+ org.omg.CosNaming,\
+ org.omg.CosNaming.NamingContextExtPackage,\
+ org.omg.CosNaming.NamingContextPackage,\
+ org.omg.Dynamic,\
+ org.omg.DynamicAny,\
+ org.omg.DynamicAny.DynAnyFactoryPackage,\
+ org.omg.DynamicAny.DynAnyPackage,\
+ org.omg.IOP,\
+ org.omg.IOP.CodecFactoryPackage,\
+ org.omg.IOP.CodecPackage,\
+ org.omg.Messaging,\
+ org.omg.PortableInterceptor,\
+ org.omg.PortableInterceptor.ORBInitInfoPackage,\
+ org.omg.PortableServer,\
+ org.omg.PortableServer.CurrentPackage,\
+ org.omg.PortableServer.POAManagerPackage,\
+ org.omg.PortableServer.POAPackage,\
+ org.omg.PortableServer.portable,\
+ org.omg.PortableServer.ServantLocatorPackage,\
+ org.omg.SendingContext,\
+ org.omg.stub.java.rmi,\
+ org.w3c.dom,\
+ org.w3c.dom.bootstrap,\
+ org.w3c.dom.events,\
+ org.w3c.dom.ls,\
+ org.xml.sax,\
+ org.xml.sax.ext,\
+ org.xml.sax.helpers
+org.osgi.framework.bootdelegation = \
+ javax.*,\
+ org.ietf.jgss,\
+ org.omg.*,\
+ org.w3c.*,\
+ org.xml.*,\
+ sun.*,\
+ com.sun.*
+org.osgi.framework.executionenvironment = \
+ OSGi/Minimum-1.0,\
+ OSGi/Minimum-1.1,\
+ JRE-1.1,\
+ J2SE-1.2,\
+ J2SE-1.3,\
+ J2SE-1.4,\
+ J2SE-1.5,\
+ JavaSE-1.6
+osgi.java.profile.name = JavaSE-1.6

Modified: tuscany/branches/sca-equinox/samples/calculator-osgi/src/main/java/calculator/CalculatorActivator.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/calculator-osgi/src/main/java/calculator/CalculatorActivator.java?rev=708234&r1=708233&r2=708234&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/calculator-osgi/src/main/java/calculator/CalculatorActivator.java (original)
+++ tuscany/branches/sca-equinox/samples/calculator-osgi/src/main/java/calculator/CalculatorActivator.java Mon Oct 27 09:38:16 2008
@@ -33,11 +33,15 @@
     private Node node;
 
     public void start(BundleContext context) throws Exception {
-        NodeFactory factory = NodeFactory.newInstance();
-        String url = ContributionLocationHelper.getContributionLocation(getClass());
-        Contribution contrib = new Contribution("c1", url);
-        node = factory.createNode("Calculator.composite", contrib);
-        node.start();
+        try {
+            NodeFactory factory = NodeFactory.newInstance();
+            String url = ContributionLocationHelper.getContributionLocation(getClass());
+            Contribution contrib = new Contribution("c1", url);
+            node = factory.createNode("Calculator.composite", contrib);
+            node.start();
+        } catch (Throwable e) {
+            e.printStackTrace();
+        }
     }
 
     public void stop(BundleContext context) throws Exception {

Modified: tuscany/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ModuleBundlesBuildMojo.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ModuleBundlesBuildMojo.java?rev=708234&r1=708233&r2=708234&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ModuleBundlesBuildMojo.java (original)
+++ tuscany/branches/sca-equinox/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ModuleBundlesBuildMojo.java Mon Oct 27 09:38:16 2008
@@ -249,7 +249,7 @@
 
             // Generate a PDE target
             if (generateTargetPlatform) {
-                File target = new File(project.getBasedir(), "tuscany.target");
+                File target = new File(project.getBuild().getDirectory(), "tuscany.target");
                 FileOutputStream targetFile = new FileOutputStream(target);
                 writeTarget(new PrintStream(targetFile), bundleSymbolicNames, eclipseFeatures);
                 targetFile.close();