river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtra...@apache.org
Subject svn commit: r1657705 - in /river/river-examples/river-examples/trunk/home: pom.xml src/main/home/hello-service.config src/main/home/infra.config src/main/home/start-hello-service.config src/main/home/start-infra.config
Date Thu, 05 Feb 2015 22:37:37 GMT
Author: gtrasuk
Date: Thu Feb  5 22:37:36 2015
New Revision: 1657705

URL: http://svn.apache.org/r1657705
Log:
Hello example service is complete (but not the client).

Added:
    river/river-examples/river-examples/trunk/home/src/main/home/hello-service.config
    river/river-examples/river-examples/trunk/home/src/main/home/infra.config
      - copied unchanged from r1650673, river/river-examples/river-examples/trunk/home/src/main/home/start-infra.config
    river/river-examples/river-examples/trunk/home/src/main/home/start-hello-service.config
Modified:
    river/river-examples/river-examples/trunk/home/pom.xml
    river/river-examples/river-examples/trunk/home/src/main/home/start-infra.config

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=1657705&r1=1657704&r2=1657705&view=diff
==============================================================================
--- river/river-examples/river-examples/trunk/home/pom.xml (original)
+++ river/river-examples/river-examples/trunk/home/pom.xml Thu Feb  5 22:37:36 2015
@@ -25,6 +25,12 @@
             <version>1.0-SNAPSHOT</version>
         </dependency>   
 
+        <dependency>
+            <groupId>org.apache.river.examples</groupId>
+            <artifactId>hello-service</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-service.config
URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/src/main/home/hello-service.config?rev=1657705&view=auto
==============================================================================
--- river/river-examples/river-examples/trunk/home/src/main/home/hello-service.config (added)
+++ river/river-examples/river-examples/trunk/home/src/main/home/hello-service.config Thu
Feb  5 22:37:36 2015
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+
+/* Configuration file for starting non-secure Hello service.
+    Note that this service is a pure JERI dynamic proxy export, so it 
+    doesn't need any codebase server.
+ */
+
+import java.lang.reflect.ReflectPermission;
+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.entry.Name;
+import net.jini.security.BasicProxyPreparer;
+
+org.apache.river.examples.hello.greeter {
+    discoveryGroup="example-group";
+
+    groups = new String[] {discoveryGroup};
+    
+    exporter = new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
+                                     new BasicILFactory());
+
+    serviceInvocationConstraints=InvocationConstraints.EMPTY;
+    
+    registrarPermissions= new Permission[] { 
+        new RuntimePermission("accessClassInPackage.com.sun.proxy"),
+        new ReflectPermission("newProxyInPackage.com.sun.jini.reggie")
+    };
+
+    registrarPreparer = 
+        new BasicProxyPreparer(false, new BasicMethodConstraints(serviceInvocationConstraints),
+            registrarPermissions );
+
+    static discoveryManager = 
+        new LookupDiscovery( groups, this);
+
+    static attributes = new Entry[] { new Name("greeter-service") };
+
+}
+
+net.jini.lookup.JoinManager {
+    registrarPreparer = org.apache.river.examples.hello.greeter.registrarPreparer;
+    registrationPreparer = org.apache.river.examples.hello.greeter.registrarPreparer;
+    
+}
+

Added: 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-service.config?rev=1657705&view=auto
==============================================================================
--- river/river-examples/river-examples/trunk/home/src/main/home/start-hello-service.config
(added)
+++ river/river-examples/river-examples/trunk/home/src/main/home/start-hello-service.config
Thu Feb  5 22:37:36 2015
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+/* Configuration file for starting non-secure Hello service.
+    Note that this service is a pure JERI dynamic proxy export, so strictly
+    speaking, it doesn't need a codebase server, but in order to be seen in 
+    the browser, the api has to be available to download.
+ */
+
+import com.sun.jini.config.ConfigUtil;
+import com.sun.jini.start.NonActivatableServiceDescriptor;
+import com.sun.jini.start.ServiceDescriptor;
+
+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";
+
+    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",
+	    new String[] { config })
+    };
+
+}//com.sun.jini.start

Modified: river/river-examples/river-examples/trunk/home/src/main/home/start-infra.config
URL: http://svn.apache.org/viewvc/river/river-examples/river-examples/trunk/home/src/main/home/start-infra.config?rev=1657705&r1=1657704&r2=1657705&view=diff
==============================================================================
--- river/river-examples/river-examples/trunk/home/src/main/home/start-infra.config (original)
+++ river/river-examples/river-examples/trunk/home/src/main/home/start-infra.config Thu Feb
 5 22:37:36 2015
@@ -20,6 +20,9 @@ import java.io.File;
 import com.sun.jini.start.NonActivatableServiceDescriptor;
 import com.sun.jini.start.ServiceDescriptor;
 import com.sun.jini.config.ConfigUtil;
+import net.jini.jeri.BasicILFactory;
+import net.jini.jeri.BasicJeriExporter;
+import net.jini.jeri.tcp.TcpServerEndpoint;
 
 start {
     port="8085";



Mime
View raw message