You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by th...@apache.org on 2012/04/12 15:01:20 UTC

svn commit: r1325233 - in /river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config: ConventionalLookupServiceConfiguration.java start-reggie.config start.config

Author: thobbs
Date: Thu Apr 12 13:01:18 2012
New Revision: 1325233

URL: http://svn.apache.org/viewvc?rev=1325233&view=rev
Log:
tidy up

Added:
    river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/start.config
Removed:
    river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/start-reggie.config
Modified:
    river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/ConventionalLookupServiceConfiguration.java

Modified: river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/ConventionalLookupServiceConfiguration.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/ConventionalLookupServiceConfiguration.java?rev=1325233&r1=1325232&r2=1325233&view=diff
==============================================================================
--- river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/ConventionalLookupServiceConfiguration.java (original)
+++ river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/ConventionalLookupServiceConfiguration.java Thu Apr 12 13:01:18 2012
@@ -19,11 +19,6 @@ public class ConventionalLookupServiceCo
 
 	private static final Logger LOGGER = Logger.getLogger(ConventionalLookupServiceConfiguration.class.getName());
 	
-//	private static final Reader fileReader() {
-//		InputStream in = Options.class.getResourceAsStream("start-reggie.config");
-//		return new BufferedReader(new InputStreamReader(in));
-//	}
-	
 	public static ConventionalLookupServiceConfiguration config() throws IOException, ConfigurationException {
 		
 		Options opts = new Options();
@@ -35,11 +30,6 @@ public class ConventionalLookupServiceCo
 		opts.LOOKUP_GROUPS.add("Chuck").add("Sarah");
 		opts.SERVICE_IMPL.setOverride("com.sun.jini.reggie.TransientRegistrarImpl");
 		opts.CODEBASE.add("reggie-dl.jar").add("jsk-dl.jar");
-//		opts.HTTP_SERVER.setOverride("nowhere");
-//		opts.setGroup("lappy");
-//		opts.setHttpPort("8080");
-//		opts.setJiniPort(4931);
-//		opts.setPackageName("com.sun.jini.reggie");
 		
 		Properties p = new Properties();
 		p.load( VelocityConfigurationBuilder.class.getResourceAsStream("velocity.properties") );
@@ -75,20 +65,8 @@ public class ConventionalLookupServiceCo
 		
         context.put("defaults", defaults.toString());
         context.put("options", options.toString());
-//        for(Setting setting : opts.OPTIONS) {
-//        	String format = setting.getFormatter();
-//        	context.put("default_"+setting.getName(),
-//        			    String.format(format, setting.getDefault()));
-//        	context.put(setting.getName(),
-//        				String.format(format, setting.getOverride()));
-//        }
-//        context.put("servicePackageName", String.format("\"%s\"",opts.getPackageName()+" {}"));
-//        context.put("riverHome", String.format("\"%s\"",opts.getRiverHome()) );
-//        context.put("groups", String.format("\\\"%s\\\"",opts.getGroup()) );
-//        context.put("httpPort", opts.getHttpPort());
-//        context.put("jiniPort", opts.getJiniPort());
         
-        Template template = ve.getTemplate( Options.class.getResource("start-reggie.config").toExternalForm() );
+        Template template = ve.getTemplate( Options.class.getResource("start.config").toExternalForm() );
         
         StringWriter sw = new StringWriter();
 

Added: river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/start.config
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/start.config?rev=1325233&view=auto
==============================================================================
--- river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/start.config (added)
+++ river/jtsk/skunk/easystart/src-extra/org/apache/river/extra/easystart/config/start.config Thu Apr 12 13:01:18 2012
@@ -0,0 +1,60 @@
+/*
+ * 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 net.jini.jrmp.JrmpExporter;
+
+import com.sun.jini.config.ConfigUtil;
+import com.sun.jini.start.NonActivatableServiceDescriptor;
+import com.sun.jini.start.ServiceDescriptor;
+
+com.sun.jini.start {
+
+    private static codebase = ${codebase};
+        
+    private static policy = ${riverHome}+"/src-extra/policy.all";
+    private static classpath = ${riverHome}+"/lib/reggie.jar";
+
+    static serviceDescriptors = new ServiceDescriptor[] {
+	new NonActivatableServiceDescriptor(
+	    codebase, 
+	    policy, 
+	    classpath,
+	    ${serviceImpl},
+	    new String[] { 
+	    "-"
+	    //overrides
+	    ${options}
+	    //overrides end
+	    /*,
+	    "com.sun.jini.reggie.serverExporter="${serverExporter}"
+	    */
+	    }
+	    )
+    };
+}
+
+${servicePackageName} {
+
+//defaults
+    ${defaults}
+//defaults end
+
+//    //static serverExporter = new BasicJeriExporter( ${registryEndpoint}, new BasicILFactory());
+//    serverExporter=new net.jini.jrmp.JrmpExporter();
+//
+}