You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by gt...@apache.org on 2011/01/11 21:27:59 UTC

svn commit: r1057849 - in /incubator/river/extra/JiniInfrastructure/trunk: ./ scripts/ src/ src/org/apache/river/extra/start/infrastructure/

Author: gtrasuk
Date: Tue Jan 11 20:27:58 2011
New Revision: 1057849

URL: http://svn.apache.org/viewvc?rev=1057849&view=rev
Log:
Preview release candidate.

Added:
    incubator/river/extra/JiniInfrastructure/trunk/ReleaseNotes.txt
    incubator/river/extra/JiniInfrastructure/trunk/scripts/
    incubator/river/extra/JiniInfrastructure/trunk/scripts/JiniInfrastructure.bat
    incubator/river/extra/JiniInfrastructure/trunk/src/startBrowserNonsecure.config
Removed:
    incubator/river/extra/JiniInfrastructure/trunk/src/browserNonSecure.config
    incubator/river/extra/JiniInfrastructure/trunk/src/fiddlerNonsecure.config
    incubator/river/extra/JiniInfrastructure/trunk/src/mahaloNonsecure.config
    incubator/river/extra/JiniInfrastructure/trunk/src/mercuryNonsecure.config
    incubator/river/extra/JiniInfrastructure/trunk/src/normNonsecure.config
    incubator/river/extra/JiniInfrastructure/trunk/src/outriggerNonsecure.config
    incubator/river/extra/JiniInfrastructure/trunk/src/reggieNonsecure.config
Modified:
    incubator/river/extra/JiniInfrastructure/trunk/README
    incubator/river/extra/JiniInfrastructure/trunk/build.xml
    incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Main.java
    incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/MessageNames.java
    incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Messages.properties
    incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Strings.java
    incubator/river/extra/JiniInfrastructure/trunk/src/startAllNonsecure.config

Modified: incubator/river/extra/JiniInfrastructure/trunk/README
URL: http://svn.apache.org/viewvc/incubator/river/extra/JiniInfrastructure/trunk/README?rev=1057849&r1=1057848&r2=1057849&view=diff
==============================================================================
--- incubator/river/extra/JiniInfrastructure/trunk/README (original)
+++ incubator/river/extra/JiniInfrastructure/trunk/README Tue Jan 11 20:27:58 2011
@@ -1,4 +1,7 @@
 
+Note: The binary release includes jar files from
+Apache River Incubating Release 2.1
+
 Starting Up the Jini Infrastructure
 ===================================
 
@@ -16,6 +19,9 @@ For instance:
 
     java -jar JiniInfrastructure MyGroup
 
+The project starts up a class server at localhost:8085, then starts Reggie,
+Fiddler, Mahalo, Mercury, Norm, and Outrigger using the given discovery group.
+
 Enjoy.
 
 Building the Infrastructure Starter Container
@@ -25,8 +31,7 @@ The container was originally built using
 project contents checked into Subversion.
 
 To build correctly, you need to define a few libraries in Netbeans:  To do this,
-right-click on the RiverSurrogate node in the Projects tab and select
-"Properties", then select the "Libraries" node.  Define the following libraries:
+go to the "Tools->Libraries" menu.  Define the following libraries:
 
 'ApacheRiverPlatform' containing
     'jsk-platform.jar'
@@ -38,7 +43,7 @@ from the River distribution.
 
 'ApacheRiverServiceStarter' containing
     'start.jar'
-    'classserver.jar'
+    'tools.jar'
 
 'ApacheRiverServices' containing
     'browser-dl.jar'
@@ -56,8 +61,7 @@ from the River distribution.
     'reggie-dl.jar'
     'reggie.jar'
 
-The project properties should already include these libraries in
-the compile classpath.
+These libraries are already referenced in the project's classpath.
 
 The project has a dependency on a sister project 'RiverConfigurationResources',
 which should be also checked out from the svn repository in the same directory

Added: incubator/river/extra/JiniInfrastructure/trunk/ReleaseNotes.txt
URL: http://svn.apache.org/viewvc/incubator/river/extra/JiniInfrastructure/trunk/ReleaseNotes.txt?rev=1057849&view=auto
==============================================================================
--- incubator/river/extra/JiniInfrastructure/trunk/ReleaseNotes.txt (added)
+++ incubator/river/extra/JiniInfrastructure/trunk/ReleaseNotes.txt Tue Jan 11 20:27:58 2011
@@ -0,0 +1,4 @@
+
+0.1RC   January 11, 2011
+========================
+Initial preview release.
\ No newline at end of file

Modified: incubator/river/extra/JiniInfrastructure/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/river/extra/JiniInfrastructure/trunk/build.xml?rev=1057849&r1=1057848&r2=1057849&view=diff
==============================================================================
--- incubator/river/extra/JiniInfrastructure/trunk/build.xml (original)
+++ incubator/river/extra/JiniInfrastructure/trunk/build.xml Tue Jan 11 20:27:58 2011
@@ -79,5 +79,9 @@
                 includes="*.policy"/>
         </copy>
 
+        <copy todir="${basedir}/dist">
+            <fileset dir="${basedir}/scripts"/>
+        </copy>
+
     </target>
 </project>

Added: incubator/river/extra/JiniInfrastructure/trunk/scripts/JiniInfrastructure.bat
URL: http://svn.apache.org/viewvc/incubator/river/extra/JiniInfrastructure/trunk/scripts/JiniInfrastructure.bat?rev=1057849&view=auto
==============================================================================
--- incubator/river/extra/JiniInfrastructure/trunk/scripts/JiniInfrastructure.bat (added)
+++ incubator/river/extra/JiniInfrastructure/trunk/scripts/JiniInfrastructure.bat Tue Jan 11 20:27:58 2011
@@ -0,0 +1,2 @@
+@ECHO OFF
+java -Djava.security.policy=policy/jsk-all.policy -jar JiniInfrastructure.jar %1

Modified: incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Main.java
URL: http://svn.apache.org/viewvc/incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Main.java?rev=1057849&r1=1057848&r2=1057849&view=diff
==============================================================================
--- incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Main.java (original)
+++ incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Main.java Tue Jan 11 20:27:58 2011
@@ -15,11 +15,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.river.extra.start.infrastructure;
 
 import com.sun.jini.start.ServiceStarter;
+import java.io.File;
 import java.util.ResourceBundle;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  *
@@ -27,24 +29,38 @@ import java.util.ResourceBundle;
  */
 public class Main {
 
+    private static final Logger log =
+            Logger.getLogger(Main.class.getName(), MessageNames.BUNDLE_NAME);
+
+    private static final ResourceBundle resources =
+            ResourceBundle.getBundle(MessageNames.BUNDLE_NAME);
+
     /**
-     Start up NonSecure River infrastructure for the given group.
-     Argument will be the name of the group for discovery/join.
-     @param args
+    Start up NonSecure River infrastructure for the given group.
+    Argument will be the name of the group for discovery/join.
+    @param args
      */
     public static void main(String args[]) {
-        if (args.length==0) {
+        log.log(Level.INFO, MessageNames.LOG_WORKING_DIR, new File(Strings.DOT).getAbsolutePath());
+        if (args.length == 0) {
             showUsage();
             System.exit(-1);
         }
-        String groupOverride=Strings.DISCOVERY_GROUP_PREFIX 
+        if (Strings.DASH_BROWSE.equals(args[0])) {
+            ServiceStarter.main(new String[]{Strings.START_BROWSER_NONSECURE});
+            return;
+        }
+        String groupOverride = Strings.DISCOVERY_GROUP_PREFIX
                 + Strings.DQUOTE + args[0] + Strings.DQUOTE;
-        ServiceStarter.main(new String[] {Strings.START_ALL_NONSECURE,
-            groupOverride});
+        ServiceStarter.main(new String[]{Strings.START_ALL_NONSECURE,
+                    groupOverride});
     }
 
     private static void showUsage() {
-        ResourceBundle rb=ResourceBundle.getBundle(MessageNames.BUNDLE_NAME);
-        System.out.println(rb.getString(MessageNames.USAGE));
+        System.out.println(resources.getString(MessageNames.USAGE));
+    }
+
+    public static String toURLString(String relative) {
+        return new File(relative).toURI().toString();
     }
 }

Modified: incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/MessageNames.java
URL: http://svn.apache.org/viewvc/incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/MessageNames.java?rev=1057849&r1=1057848&r2=1057849&view=diff
==============================================================================
--- incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/MessageNames.java (original)
+++ incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/MessageNames.java Tue Jan 11 20:27:58 2011
@@ -26,5 +26,6 @@ public class MessageNames {
             "org.apache.river.extra.start.infrastructure.Messages";
 
     public static final String
+            LOG_WORKING_DIR="logWorkingDirectory",
             USAGE="show.usage";
 }

Modified: incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Messages.properties?rev=1057849&r1=1057848&r2=1057849&view=diff
==============================================================================
--- incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Messages.properties (original)
+++ incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Messages.properties Tue Jan 11 20:27:58 2011
@@ -15,10 +15,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-
+logWorkingDirectory=Current working directory is ''{0}''.
 show.usage=\
-Usage: java -jar JiniInfrastructure group\n\
+Usage: java -Djava.security.policy=policy/jsk-all.policy -jar JiniInfrastructure group\n\
     \tgroup is the discovery workgroup\n\
-Example:\n\
-    \tjava -jar JiniInfrastructure MyGroup\n
+or: java -Djava.security.policy=policy/jsk-all.policy -jar JiniInfrastructure -browse\n\
+Examples:\n\
+    \tjava -Djava.security.policy=policy/jsk-all.policy -jar JiniInfrastructure MyGroup\n
 

Modified: incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Strings.java
URL: http://svn.apache.org/viewvc/incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Strings.java?rev=1057849&r1=1057848&r2=1057849&view=diff
==============================================================================
--- incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Strings.java (original)
+++ incubator/river/extra/JiniInfrastructure/trunk/src/org/apache/river/extra/start/infrastructure/Strings.java Tue Jan 11 20:27:58 2011
@@ -23,7 +23,10 @@ package org.apache.river.extra.start.inf
  */
 public class Strings {
     public static final String
+            DASH_BROWSE="-browse",
             DISCOVERY_GROUP_PREFIX="start.discoveryGroup=",
+            DOT=".",
             DQUOTE="\"",
-            START_ALL_NONSECURE="startAllNonsecure.config";
+            START_ALL_NONSECURE="startAllNonsecure.config",
+            START_BROWSER_NONSECURE="startBrowserNonsecure.config";
 }

Modified: incubator/river/extra/JiniInfrastructure/trunk/src/startAllNonsecure.config
URL: http://svn.apache.org/viewvc/incubator/river/extra/JiniInfrastructure/trunk/src/startAllNonsecure.config?rev=1057849&r1=1057848&r2=1057849&view=diff
==============================================================================
--- incubator/river/extra/JiniInfrastructure/trunk/src/startAllNonsecure.config (original)
+++ incubator/river/extra/JiniInfrastructure/trunk/src/startAllNonsecure.config Tue Jan 11 20:27:58 2011
@@ -20,80 +20,106 @@ import com.sun.jini.start.NonActivatable
 import com.sun.jini.start.ServiceDescriptor;
 import com.sun.jini.config.ConfigUtil;
 
+start {
+    port="8085";
+}
+
 com.sun.jini.start {
     private static policy = "policy/jsk-all.policy";
     private static host = ConfigUtil.getHostName();
-    private static port = "8085";
+    private static port = start.port;
     private static jskdl = " http://" + host + ":" + port + "/jsk-dl.jar";
 
     serviceDescriptors = new ServiceDescriptor[]{
         new NonActivatableServiceDescriptor(
             "",
             policy,
-            "/lib/classserver.jar",
+            "lib/tools.jar",
             "com.sun.jini.tool.ClassServer",
             new String[]{"-port", port, "-dir",
                 "lib",
                 "-verbose"}),
 
         new NonActivatableServiceDescriptor(
-            "http://" + host + ":" + port + "/reggie-dl.jar" + jskdl,
+            "http://" + host + ":" + port + "/mahalo-dl.jar" + jskdl,
             policy,
-            "lib/reggie.jar lib/RiverConfigurationResource.jar",
-            "com.sun.jini.reggie.TransientRegistrarImpl",
-            new String[] { "reggieNonsecure.config",
+            "lib/mahalo.jar",
+            "com.sun.jini.mahalo.TransientMahaloImpl",
+            new String[] { "startAllNonsecure.config",
                 "start.discoveryGroup=\"" + start.discoveryGroup + "\""}),
 
-       new NonActivatableServiceDescriptor(
-            "http://" + host + ":" + port + "/fiddler-dl.jar" + jskdl,
+        new NonActivatableServiceDescriptor(
+            "http://" + host + ":" + port + "/mercury-dl.jar" + jskdl,
             policy,
-            "lib/fiddler.jar",
-            "com.sun.jini.fiddler.TransientFiddlerImpl",
-            new String[] { "fiddlerNonsecure.config" })
-
-    };
+            "lib/mercury.jar",
+            "com.sun.jini.mercury.TransientMercuryImpl",
+            new String[] { "startAllNonsecure.config",
+                "start.discoveryGroup=\"" + start.discoveryGroup + "\""}),
 
-    unusedServiceDescriptors = new ServiceDescriptor[]{
         new NonActivatableServiceDescriptor(
-            "http://" + host + ":" + port + "/browser-dl.jar" + jskdl,
+            "http://" + host + ":" + port + "/reggie-dl.jar" + jskdl,
             policy,
-            "lib/browser.jar",
-            "com.sun.jini.example.browser.Browser",
-            new String[] { "browserNonsecure.config" }),
+            "lib/reggie.jar lib/RiverConfigurationResource.jar",
+            "com.sun.jini.reggie.TransientRegistrarImpl",
+            new String[] { "startAllNonsecure.config",
+                "start.discoveryGroup=\"" + start.discoveryGroup + "\""}),
 
        new NonActivatableServiceDescriptor(
             "http://" + host + ":" + port + "/fiddler-dl.jar" + jskdl,
             policy,
             "lib/fiddler.jar",
             "com.sun.jini.fiddler.TransientFiddlerImpl",
-            new String[] { "fiddlerNonsecure.config" }),
-
-        new NonActivatableServiceDescriptor(
-            "http://" + host + ":" + port + "/mahalo-dl.jar" + jskdl,
-            policy,
-            "mahalo.jar",
-            "com.sun.jini.mahalo.TransientMahaloImpl",
-            new String[] { "mahaloNonsecure.config" }),
-
-        new NonActivatableServiceDescriptor(
-            "http://" + host + ":" + port + "/mercury-dl.jar" + jskdl,
-            policy,
-            "lib/mercury.jar",
-            "com.sun.jini.mercury.TransientMercuryImpl",
-            new String[] { "mercuryNonsecure.config" }),
+            new String[] { "startAllNonsecure.config",
+                "start.discoveryGroup=\"" + start.discoveryGroup + "\""}),
 
         new NonActivatableServiceDescriptor(
             "http://" + host + ":" + port + "/norm-dl.jar" + jskdl,
             policy,
             "lib/norm.jar",
             "com.sun.jini.norm.TransientNormServerImpl",
-            new String[] { "normNonsecure.config" }),
+            new String[] { "startAllNonsecure.config",
+                "start.discoveryGroup=\"" + start.discoveryGroup + "\""}),
 
         new NonActivatableServiceDescriptor(
             "http://" + host + ":" + port + "/outrigger-dl.jar" + jskdl,
             policy,
             "lib/outrigger.jar",
             "com.sun.jini.outrigger.TransientOutriggerImpl",
-            new String[] { "outriggerNonSecure.config" })
+            new String[] { "startAllNonsecure.config",
+                "start.discoveryGroup=\"" + start.discoveryGroup + "\""}),
     };
+
+    unusedServiceDescriptors = new ServiceDescriptor[]{
+        new NonActivatableServiceDescriptor(
+            "http://" + host + ":" + port + "/browser-dl.jar" + jskdl,
+            policy,
+            "lib/browser.jar",
+            "com.sun.jini.example.browser.Browser",
+            new String[] { "browserNonsecure.config" }),
+
+    };
+}
+
+com.sun.jini.fiddler {
+    initialLookupGroups = new String[] { start.discoveryGroup };
+}
+
+com.sun.jini.mahalo {
+    initialLookupGroups = new String[] { start.discoveryGroup };
+}
+
+com.sun.jini.mercury {
+    initialLookupGroups = new String[] { start.discoveryGroup };
+}
+
+com.sun.jini.norm {
+    initialLookupGroups = new String[] { start.discoveryGroup };
+}
+
+com.sun.jini.outrigger {
+    initialLookupGroups = new String[] { start.discoveryGroup };
+}
+
+com.sun.jini.reggie {
+    initialMemberGroups = new String[] { start.discoveryGroup };
 }

Added: incubator/river/extra/JiniInfrastructure/trunk/src/startBrowserNonsecure.config
URL: http://svn.apache.org/viewvc/incubator/river/extra/JiniInfrastructure/trunk/src/startBrowserNonsecure.config?rev=1057849&view=auto
==============================================================================
--- incubator/river/extra/JiniInfrastructure/trunk/src/startBrowserNonsecure.config (added)
+++ incubator/river/extra/JiniInfrastructure/trunk/src/startBrowserNonsecure.config Tue Jan 11 20:27:58 2011
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+import java.io.File;
+import com.sun.jini.start.NonActivatableServiceDescriptor;
+import com.sun.jini.start.ServiceDescriptor;
+import com.sun.jini.config.ConfigUtil;
+import org.apache.river.extra.start.infrastructure.Main;
+
+start {
+    port = "8086";
+}
+
+com.sun.jini.start {
+    private static policy = "policy/jsk-all.policy";
+    private static host = ConfigUtil.getHostName();
+    private static port = start.port;
+    private static jskdl = " http://" + host + ":" + port + "/jsk-dl.jar";
+
+    serviceDescriptors = new ServiceDescriptor[]{
+        new NonActivatableServiceDescriptor(
+            "",
+            policy,
+            "lib/tools.jar",
+            "com.sun.jini.tool.ClassServer",
+            new String[]{"-port", port, "-dir",
+                "lib",
+                "-verbose"}),
+
+        new NonActivatableServiceDescriptor(
+            "http://" + host + ":" + port + "/browser-dl.jar" + jskdl,
+            policy,
+            "lib/mercury.jar",
+            "com.sun.jini.example.browser.Browser",
+            new String[] { "startBrowserNonsecure.config"})
+
+    };
+
+}
+
+com.sun.jini.example.browser {
+    exitActionListener = new com.sun.jini.example.browser.Browser.Exit();
+}