cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject cxf-dosgi git commit: [DOSGI-230] Fixes in tcp provider
Date Tue, 08 Mar 2016 16:54:22 GMT
Repository: cxf-dosgi
Updated Branches:
  refs/heads/master 80b4dc28f -> 735c6c7c5


[DOSGI-230] Fixes in tcp provider


Project: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/commit/735c6c7c
Tree: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/tree/735c6c7c
Diff: http://git-wip-us.apache.org/repos/asf/cxf-dosgi/diff/735c6c7c

Branch: refs/heads/master
Commit: 735c6c7c5c207f2c6d765f416d792923de84b38b
Parents: 80b4dc2
Author: Christian Schneider <chris@die-schneider.net>
Authored: Tue Mar 8 17:54:15 2016 +0100
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Tue Mar 8 17:54:15 2016 +0100

----------------------------------------------------------------------
 dsw/cxf-dosgi-tcp/pom.xml                                      | 2 +-
 .../main/java/org/apache/aries/rsa/provider/tcp/Activator.java | 5 ++++-
 .../main/java/org/apache/aries/rsa/provider/tcp/TCPServer.java | 6 ++++--
 .../apache/aries/rsa/provider/tcp/TcpInvocationHandler.java    | 2 ++
 4 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/735c6c7c/dsw/cxf-dosgi-tcp/pom.xml
----------------------------------------------------------------------
diff --git a/dsw/cxf-dosgi-tcp/pom.xml b/dsw/cxf-dosgi-tcp/pom.xml
index 2d2e5f3..8e40ee1 100644
--- a/dsw/cxf-dosgi-tcp/pom.xml
+++ b/dsw/cxf-dosgi-tcp/pom.xml
@@ -63,7 +63,7 @@
                 <configuration>
                     <instructions>
                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <Bundle-Activator>org.apache.cxf.dosgi.dsw.service.Activator</Bundle-Activator>
+                        <Bundle-Activator>org.apache.aries.rsa.provider.tcp.Activator</Bundle-Activator>
                     </instructions>
                 </configuration>
             </plugin>

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/735c6c7c/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/Activator.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/Activator.java
b/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/Activator.java
index 71d54f4..128c3d8 100644
--- a/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/Activator.java
+++ b/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/Activator.java
@@ -24,13 +24,16 @@ import java.util.Hashtable;
 import org.apache.cxf.dosgi.dsw.api.DistributionProvider;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
+import org.osgi.service.remoteserviceadmin.RemoteConstants;
 
 public class Activator implements BundleActivator {
 
     @Override
     public void start(BundleContext context) throws Exception {
         DistributionProvider provider = new TCPProvider();
-        Dictionary<String, ?> props = new Hashtable<>();
+        Dictionary<String, Object> props = new Hashtable<>();
+        props.put(RemoteConstants.REMOTE_INTENTS_SUPPORTED, new String[]{});
+        props.put(RemoteConstants.REMOTE_CONFIGS_SUPPORTED, provider.getSupportedTypes());
         context.registerService(DistributionProvider.class, provider, props);
     }
 

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/735c6c7c/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TCPServer.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TCPServer.java
b/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TCPServer.java
index 0eeebc9..dd8e423 100644
--- a/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TCPServer.java
+++ b/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TCPServer.java
@@ -95,8 +95,10 @@ public class TCPServer implements Closeable, Runnable {
 
     private Class<?>[] getTypes(Object[] args) {
         List<Class<?>> parameterTypes = new ArrayList<>();
-        for (Object arg : args) {
-            parameterTypes.add(arg.getClass());
+        if (args != null) {
+            for (Object arg : args) {
+                parameterTypes.add(arg.getClass());
+            }
         }
         Class<?>[] parameterTypesAr = parameterTypes.toArray(new Class[]{});
         return parameterTypesAr;

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/735c6c7c/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TcpInvocationHandler.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TcpInvocationHandler.java
b/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TcpInvocationHandler.java
index 37ed11e..cdbf8ec 100644
--- a/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TcpInvocationHandler.java
+++ b/dsw/cxf-dosgi-tcp/src/main/java/org/apache/aries/rsa/provider/tcp/TcpInvocationHandler.java
@@ -49,6 +49,8 @@ public class TcpInvocationHandler implements InvocationHandler {
             out.writeObject(args);
             out.flush();
             return parseResult(socket);
+        } catch (Exception  e) {
+            throw new RuntimeException("Error calling " + host + ":" + port + " method: "
+ method.getName(), e);
         }
     }
 


Mime
View raw message