river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtra...@apache.org
Subject svn commit: r1657984 - in /river/river-examples/river-examples/trunk/home: pom.xml src/main/home/hello-client.config src/main/home/start-hello-client.config
Date Fri, 06 Feb 2015 22:54:33 GMT
Author: gtrasuk
Date: Fri Feb  6 22:54:32 2015
New Revision: 1657984

URL: http://svn.apache.org/r1657984
Log:
The set of examples is complete, including the client.  To use the project, follow the instructions
starting in README.md.

Added:
    river/river-examples/river-examples/trunk/home/src/main/home/hello-client.config
    river/river-examples/river-examples/trunk/home/src/main/home/start-hello-client.config
      - copied, changed from r1657705, river/river-examples/river-examples/trunk/home/src/main/home/start-hello-service.config
Modified:
    river/river-examples/river-examples/trunk/home/pom.xml

Modified: river/river-examples/river-examples/trunk/home/pom.xml
URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/pom.xml?rev=1657984&r1=1657983&r2=1657984&view=diff
==============================================================================
--- river/river-examples/river-examples/trunk/home/pom.xml (original)
+++ river/river-examples/river-examples/trunk/home/pom.xml Fri Feb  6 22:54:32 2015
@@ -31,6 +31,12 @@
             <version>1.0-SNAPSHOT</version>
         </dependency>   
 
+        <dependency>
+            <groupId>org.apache.river.examples</groupId>
+            <artifactId>hello-client</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>   
+
         <!-- Note that the version ids for the following are in the 
         dependency-management block on the parent pom!. -->
         <dependency>

Added: river/river-examples/river-examples/trunk/home/src/main/home/hello-client.config
URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/src/main/home/hello-client.config?rev=1657984&view=auto
==============================================================================
--- river/river-examples/river-examples/trunk/home/src/main/home/hello-client.config (added)
+++ river/river-examples/river-examples/trunk/home/src/main/home/hello-client.config Fri Feb
 6 22:54:32 2015
@@ -0,0 +1,38 @@
+import java.security.Permission;
+import net.jini.constraint.BasicMethodConstraints;
+import net.jini.core.constraint.InvocationConstraints;
+import net.jini.core.entry.Entry;
+import net.jini.core.lookup.ServiceID;
+import net.jini.discovery.LookupDiscovery;
+import net.jini.jeri.BasicILFactory;
+import net.jini.jeri.BasicJeriExporter;
+import net.jini.jeri.tcp.TcpServerEndpoint;
+import net.jini.lookup.JoinManager;
+import net.jini.lookup.ServiceDiscoveryManager;
+import net.jini.lookup.entry.Name;
+import net.jini.security.BasicProxyPreparer;
+
+org.apache.river.examples.hello.client {
+	
+    discoveryGroup="example-group";
+
+    groups = new String[] {discoveryGroup};
+    
+    exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
+                                     new BasicILFactory());
+
+    serviceInvocationConstraints=InvocationConstraints.EMPTY;
+        
+    basicPreparer = 
+        new BasicProxyPreparer(false, new BasicMethodConstraints(serviceInvocationConstraints),
+            new Permission[] { new RuntimePermission("accessClassInPackage.com.sun.proxy")
} );
+
+    static discoveryManager = 
+        new LookupDiscovery( groups, this);
+
+    greeterPreparer = basicPreparer;
+    registrarPreparer = basicPreparer;
+
+    static sdm = new ServiceDiscoveryManager(discoveryManager, null);
+
+}

Copied: river/river-examples/river-examples/trunk/home/src/main/home/start-hello-client.config
(from r1657705, river/river-examples/river-examples/trunk/home/src/main/home/start-hello-service.config)
URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/src/main/home/start-hello-client.config?p2=river/river-examples/river-examples/trunk/home/src/main/home/start-hello-client.config&p1=river/river-examples/river-examples/trunk/home/src/main/home/start-hello-service.config&r1=1657705&r2=1657984&rev=1657984&view=diff
==============================================================================
--- river/river-examples/river-examples/trunk/home/src/main/home/start-hello-service.config
(original)
+++ river/river-examples/river-examples/trunk/home/src/main/home/start-hello-client.config
Fri Feb  6 22:54:32 2015
@@ -29,24 +29,14 @@ import com.sun.jini.start.ServiceDescrip
 com.sun.jini.start {
 
     private static policy = "server.policy";
-    private static classpath = "lib${/}hello-api.jar:lib${/}hello-service.jar";
-    private static config = "hello-service.config";
-    port="8090";
-    private static codebasePrefix= "http://" + ConfigUtil.getHostAddress() 
-        + ":" + port + "/";
-    private static codebase = codebasePrefix + "hello-api.jar";
+    private static classpath = "lib${/}hello-api.jar:lib${/}hello-client.jar";
+    private static config = "hello-client.config";
+    private static codebase="";
 
     static serviceDescriptors = new ServiceDescriptor[] {
 	new NonActivatableServiceDescriptor(
-            "",
-            policy,
-            "lib/tools.jar",
-            "com.sun.jini.tool.ClassServer",
-            new String[]{"-port", port, "-dir",
-                "lib-dl"}),
-	new NonActivatableServiceDescriptor(
 	    codebase, policy, classpath,
-	    "org.apache.river.examples.hello.service.GreeterService",
+	    "org.apache.river.examples.hello.client.App",
 	    new String[] { config })
     };
 



Mime
View raw message