Modified: 
river/jtsk/branches/2.2/src/com/sun/jini/start/NonActivatableServiceDescriptor.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/start/NonActivatableServiceDescriptor.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- 
river/jtsk/branches/2.2/src/com/sun/jini/start/NonActivatableServiceDescriptor.java
 (original)
+++ 
river/jtsk/branches/2.2/src/com/sun/jini/start/NonActivatableServiceDescriptor.java
 Sun Dec  6 08:23:59 2015
@@ -36,16 +36,19 @@ import java.io.Serializable;
 import java.lang.reflect.Constructor;
 import java.net.URLClassLoader;
 import java.rmi.MarshalledObject;
+import java.security.AccessController;
 import java.security.Permission;
 import java.security.Policy;
 import java.security.AllPermission;
+import java.security.PrivilegedAction;
+import java.security.Security;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
- * Class used to launch shared, non-activatable, in-process 
+ * Class used to launch shared, in-process 
  * services. Clients construct this object with the details
  * of the service to be launched, then call 
  * {@link #create(net.jini.config.Configuration) create(Configuration config) }
@@ -596,7 +599,7 @@ public class NonActivatableServiceDescri
         URLClassLoader newClassLoader = null;
         try {
             newClassLoader = 
-               new ActivateWrapper.ExportClassLoader(
+               new ExportClassLoader(
                    ClassLoaderUtil.getImportCodebaseURLs(getImportCodebase()),
                    ClassLoaderUtil.getCodebaseURLs(getExportCodebase()),
                    oldClassLoader);
@@ -624,10 +627,10 @@ public class NonActivatableServiceDescri
            }
            
            Policy service_policy =
-               ActivateWrapper.getServicePolicyProvider(
+               getServicePolicyProvider(
                     new PolicyFileProvider(getPolicy()));
            Policy backstop_policy =
-               ActivateWrapper.getServicePolicyProvider(initialGlobalPolicy);
+               getServicePolicyProvider(initialGlobalPolicy);
            LoaderSplitPolicyProvider split_service_policy =
                new LoaderSplitPolicyProvider(
                    newClassLoader, service_policy, backstop_policy);
@@ -751,5 +754,52 @@ public class NonActivatableServiceDescri
     private void readObjectNoData() throws ObjectStreamException {
        throw new InvalidObjectException("no data");
     }
+    
+    static Policy getServicePolicyProvider(Policy service_policy) throws 
Exception {
+        Policy servicePolicyWrapper = null;
+        if (servicePolicyProvider != null) {
+           Class sp = Class.forName(servicePolicyProvider);
+           logger.log(Level.FINEST, 
+               "Obtained custom service policy implementation class: {0}", sp);
+           Constructor constructor =
+               sp.getConstructor(policyTypes);
+           logger.log(Level.FINEST, 
+               "Obtained custom service policy implementation constructor: 
{0}", 
+               constructor);
+           servicePolicyWrapper = (Policy)
+               constructor.newInstance(new Object[]{service_policy});
+           logger.log(Level.FINEST, 
+               "Obtained custom service policy implementation instance: {0}", 
+               servicePolicyWrapper);
+       } else {
+          servicePolicyWrapper = new DynamicPolicyProvider(service_policy);
+          logger.log(Level.FINEST, 
+               "Using default service policy implementation instance: {0}", 
+               servicePolicyWrapper);
+       }
+       return servicePolicyWrapper;
+    }
+   
+    /** 
+     * Fully qualified name of custom, service policy provider 
+     */
+    private static String servicePolicyProvider =
+       ((String) AccessController.doPrivileged(
+           new PrivilegedAction() {
+               public Object run() {
+                   return Security.getProperty(
+                           "com.sun.jini.start." +
+                           "servicePolicyProvider");
+               }
+           }));
+
+    /**
+     * The parameter types for the 
+     * "custom, service policy constructor".
+     */
+    private static final Class[] policyTypes = {
+        Policy.class
+    };
+    
 } 
 

Modified: river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/EnvCheck.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/EnvCheck.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/EnvCheck.java 
(original)
+++ river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/EnvCheck.java Sun 
Dec  6 08:23:59 2015
@@ -44,8 +44,6 @@ import net.jini.config.ConfigurationProv
 
 import com.sun.jini.start.ServiceDescriptor;
 import com.sun.jini.start.NonActivatableServiceDescriptor;
-import com.sun.jini.start.SharedActivatableServiceDescriptor;
-import com.sun.jini.start.SharedActivationGroupDescriptor;
 
 import com.sun.jini.tool.envcheck.Reporter.Message;
 
@@ -504,24 +502,6 @@ public class EnvCheck {
     }
 
     /**
-     * Return the <code>SharedActivationGroupDescriptor</code> contained in the
-     * service starter configuration. Returns <code>null</code> if there is no
-     * such descriptor, or if the command being analyzed does not invoke the
-     * service starter.
-     *
-     * @return the <code>SharedActivationGroupDescriptor</code> or 
-     *         <code>null</code>
-     */
-    public SharedActivationGroupDescriptor getGroupDescriptor() {
-       for (int i = 0; i < descriptors.length; i++) {
-           if (descriptors[i] instanceof SharedActivationGroupDescriptor) {
-               return (SharedActivationGroupDescriptor) descriptors[i];
-           }
-       }
-       return null;
-    }
-
-    /**
      * Perform the runtime checks. If any user plugins were supplied, construct
      * a class loader capable of loading them and modify
      * <code>combinedClasspath</code> to make the classes available to 
subtasks.
@@ -891,10 +871,9 @@ public class EnvCheck {
      *         <code>System.out</code> stream.
      */
     public Object launch(NonActivatableServiceDescriptor d, 
-                        SharedActivationGroupDescriptor gd,
                         String taskName)
     {
-       return launch(d, gd, taskName, null);
+       return launch(d, taskName, null);
     }
 
     /**
@@ -906,51 +885,7 @@ public class EnvCheck {
      * <code>launch(taskName, args)</code>.
      * <p>
 
-     * If <code>d</code> is <code>null</code> and <code>gd</code> is
-     * non-<code>null</code> then the properties are taken from
-     * <code>gd.getServerProperties()</code> and the
-     * <code>java.security.policy</code> property is added or replaced with the
-     * value of <code>gd.getPolicy()</code>.  The options are taken from
-     * <code>gd.getServerOptions()</code>, but any <code>-cp/-classpath</code>
-     * option is discarded; a <code>-cp</code> option is added that is the 
value
-     * of <code>gd.getClasspath()</code> augmented with the classpath of the
-     * tool and plugins.  If <code>gd.getServerCommand()</code> is
-     * non-<code>null</code>, its value is used to invoke the child VM;
-     * otherwise the <code>java</code> command of the command line being
-     * analyzed is used. The arguments passed to the child VM consist of an
-     * array whose first element is <code>taskName</code> and whose remaining
-     * elements are taken from <code>args</code>.
-
-     * <p>
-
-     * If <code>d</code> is not <code>null</code>, but <code>gd</code> is
-     * <code>null</code>, then if <code>d</code> is an instance of
-     * <code>SharedActivatableServiceDescriptor</code> an
-     * <code>IllegalArgumentException</code> is thrown. Otherwise the 
properties
-     * and options are taken from the command line being analyzed. The
-     * <code>java.security.policy</code> property is added or replaced using 
the
-     * value of <code>d.getPolicy()</code>.  The <code>-cp/-classpath</code>
-     * option is replaced with the value of <code>d.getImportCodebase()</code>
-     * augmented with the classpath of the tool and plugins.  The arguments
-     * passed to the child VM consist of <code>taskName</code> followed by
-     * <code>args</code> if <code>args</code> is non-<code>null</code>, or
-     * followed by <code>d.getServerConfigArgs()</code> otherwise.  The VM is
-     * invoked using the <code>java</code> command of the command line being
-     * analyzed.
-
-     * <p>
-
-     * if <code>d</code> and <code>gd</code> are both non-<code>null</code> 
then
-     * if <code>d</code> is an instance of
-     * <code>SharedActivatableServiceDescriptor</code> then the properties,
-     * options, and <code>java</code> command are taken from
-     * <code>gd.getServerProperties()</code>,
-     * <code>gd.getServerOptions()</code>, and
-     * <code>gd.getServerCommand()</code>; however, if the value of
-     * <code>gd.getServerCommand()</code> is <code>null</code>, the
-     * <code>java</code> command is taken from the command line being
-     * analysed. If <code>d</code> is not an instance of
-     * <code>SharedActivatableServiceDescriptor</code> then the properties,
+     * The properties,
      * options, and <code>java</code> command are taken from the command line
      * being analyzed.  In all cases the <code>java.security.policy</code>
      * property is added or replaced using the value of
@@ -965,7 +900,6 @@ public class EnvCheck {
      * <p>
      *
      * @param d the service descriptor, which may be <code>null</code>
-     * @param gd the group descriptor, which may be <code>null</code
      * @param taskName the name of the subtask to run
      * @param args the arguments to pass to the child VM, which may be 
      *             <code>null</code>
@@ -974,11 +908,10 @@ public class EnvCheck {
      *         <code>System.out</code> stream.
      */
     public Object launch(NonActivatableServiceDescriptor d, 
-                        SharedActivationGroupDescriptor gd,
                         String taskName,
                         String[] args)
     {
-       if (d == null && gd == null) {
+       if (d == null ) {
            return launch(taskName, args);
        }
        //build taskArgs array
@@ -997,86 +930,24 @@ public class EnvCheck {
        taskArgs[0] = taskName;
        System.arraycopy(args, 0, taskArgs, 1, args.length);
        
-       if (d == null && gd != null) {
-           Properties props = gd.getServerProperties();
-           props.put("java.security.policy", gd.getPolicy());
-           ArrayList l = new ArrayList();
-           String[] opts = gd.getServerOptions();
-           if (opts != null) {
-               for (int i = 0; i < opts.length; i++ ) {
-                   if (opts[i].equals("-cp")) {
-                       i++; // bump past value
-                   } else {
-                       l.add(opts[i]);
-                   }
-               }
-           }
-           l.add("-cp");
-           l.add(gd.getClasspath() + File.pathSeparator + combinedClasspath);
-           opts = (String[]) l.toArray(new String[l.size()]);
-           String cmd = gd.getServerCommand();
-           if (cmd == null) {
-               cmd = javaCmd;
-           }
-           return launch(cmd, props, opts, taskArgs);
-       } else if (d != null && gd == null) {
-           if (d instanceof SharedActivatableServiceDescriptor) {
-               throw new IllegalArgumentException("no group for service");
-           }
-           Properties props = getProperties();
-           props.put("java.security.policy", d.getPolicy());
-           ArrayList l = new ArrayList();
-           for (int i = 0; i < options.length; i++ ) {
-               if (options[i].equals("-cp") 
-                   || options[i].equals("-classpath")) {
-                   i++; // bump past value
-               } else {
-                   l.add(options[i]);
-               }
-           }
-           l.add("-cp");
-           l.add(d.getImportCodebase() 
-                   + File.pathSeparator 
-                   + combinedClasspath);
-           String[] opts = (String[]) l.toArray(new String[l.size()]);
-           return launch(javaCmd, props, opts, taskArgs);
-       } else if (d != null && gd != null) {
-           Properties props = getProperties();
-           String[] opts = options;
-           String vm = null;
-           if (d instanceof SharedActivatableServiceDescriptor) {
-               props = gd.getServerProperties();
-               if (props == null) {
-                   props = new Properties();
-               }
-               opts = gd.getServerOptions();
-               vm = gd.getServerCommand();
-           }
-           if (vm == null) {
-               vm = javaCmd;
-           }
-           props.put("java.security.policy", d.getPolicy());
-           ArrayList l = new ArrayList();
-           if (opts != null) {
-               for (int i = 0; i < opts.length; i++ ) {
-                   if (opts[i].equals("-cp")
-                    || opts[i].equals("-classpath")) {
-                       i++; // bump past value
-                   } else {
-                       l.add(opts[i]);
-                   }
-               }
-           }
-           l.add("-cp");
-           l.add(d.getImportCodebase() 
-                 + File.pathSeparator 
-                 + combinedClasspath);
-           opts = (String[]) l.toArray(new String[l.size()]);
-           return launch(vm, props, opts, taskArgs);
-       } else {
-           throw new IllegalStateException("Should never get here");
-       }
-    }
+        Properties props = getProperties();
+        props.put("java.security.policy", d.getPolicy());
+        ArrayList l = new ArrayList();
+        for (int i = 0; i < options.length; i++ ) {
+            if (options[i].equals("-cp") 
+                || options[i].equals("-classpath")) {
+                i++; // bump past value
+            } else {
+                l.add(options[i]);
+            }
+        }
+        l.add("-cp");
+        l.add(d.getImportCodebase() 
+                + File.pathSeparator 
+                + combinedClasspath);
+        String[] opts = (String[]) l.toArray(new String[l.size()]);
+        return launch(javaCmd, props, opts, taskArgs);
+}
 
     /** 
      * Return the <code>java</code> command for the command line being 
analyzed.

Modified: river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/Util.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/Util.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/Util.java (original)
+++ river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/Util.java Sun Dec  6 
08:23:59 2015
@@ -18,8 +18,6 @@
 package com.sun.jini.tool.envcheck;
 
 import com.sun.jini.start.NonActivatableServiceDescriptor;
-import com.sun.jini.start.SharedActivatableServiceDescriptor;
-import com.sun.jini.start.SharedActivationGroupDescriptor;
 
 import java.io.File;
 import java.io.IOException;

Modified: 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckCodebase.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckCodebase.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckCodebase.java
 (original)
+++ 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckCodebase.java
 Sun Dec  6 08:23:59 2015
@@ -19,7 +19,6 @@ package com.sun.jini.tool.envcheck.plugi
 
 import com.sun.jini.start.NonActivatableServiceDescriptor;
 import com.sun.jini.start.ServiceDescriptor;
-import com.sun.jini.start.SharedActivationGroupDescriptor;
 
 import com.sun.jini.tool.envcheck.AbstractPlugin;
 import com.sun.jini.tool.envcheck.Plugin;
@@ -80,17 +79,16 @@ public class CheckCodebase extends Abstr
        if (envCheck.getDescriptors().length == 0) {
            source = getString("propsource");
            codebase = envCheck.getProperty("java.rmi.server.codebase");
-           doChecks(null, null, source, codebase);
+           doChecks(null, source, codebase);
        } else {
            ServiceDescriptor[] sd = envCheck.getDescriptors();
-           SharedActivationGroupDescriptor g = envCheck.getGroupDescriptor();
            for (int i = 0; i < sd.length; i++) {
                if (sd[i] instanceof NonActivatableServiceDescriptor) {
                    NonActivatableServiceDescriptor d = 
                        (NonActivatableServiceDescriptor) sd[i];
                    source = getString("desc") + " " + d.getImplClassName();
                    codebase = d.getExportCodebase();
-                   doChecks(d, g, source, codebase);
+                   doChecks(d, source, codebase);
                }
            }
        }
@@ -104,7 +102,6 @@ public class CheckCodebase extends Abstr
      * @param codebase the codebase to check
      */
     private void doChecks(NonActivatableServiceDescriptor d,
-                         SharedActivationGroupDescriptor g,
                          String source, 
                          String codebase) 
     {
@@ -112,7 +109,7 @@ public class CheckCodebase extends Abstr
            StringTokenizer tok = new StringTokenizer(codebase);
            while (tok.hasMoreTokens()) {
                String urlToken = tok.nextToken();
-               URL url = checkURL(d, g, source, urlToken);
+               URL url = checkURL(d, source, urlToken);
                if (url != null) {
                    checkForFQDomain(url, source);
                    checkForMD5(url, source);
@@ -164,14 +161,13 @@ public class CheckCodebase extends Abstr
      *         otherwise
      */
     private URL checkURL(NonActivatableServiceDescriptor d,
-                        SharedActivationGroupDescriptor g,
                         String source, 
                         final String urlToken) 
     {
        Message message;
        URL url = null;
        String[] args = new String[]{urlToken};
-       Object lobj = envCheck.launch(d, g, taskName("GetURLTask"), args);
+       Object lobj = envCheck.launch(d, taskName("GetURLTask"), args);
        if (lobj instanceof URL) {
            url = (URL) lobj;
        } else if (lobj instanceof String) {

Modified: 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckConfig.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckConfig.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckConfig.java 
(original)
+++ 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckConfig.java 
Sun Dec  6 08:23:59 2015
@@ -46,8 +46,6 @@ import net.jini.config.ConfigurationProv
 import net.jini.config.NoSuchEntryException;
 
 import com.sun.jini.start.NonActivatableServiceDescriptor;
-import com.sun.jini.start.SharedActivatableServiceDescriptor;
-import com.sun.jini.start.SharedActivationGroupDescriptor;
 import com.sun.jini.start.ServiceDescriptor;
 import com.sun.jini.start.ClassLoaderUtil;
 
@@ -145,7 +143,7 @@ public class CheckConfig extends Abstrac
        Message message;
        String task = taskName("ConfigTask");
        boolean ret = false;
-       Object o = envCheck.launch(d, envCheck.getGroupDescriptor(), task);
+       Object o = envCheck.launch(d, task);
        if (o instanceof Boolean) {
            if (((Boolean) o).booleanValue()) {
                message = new Message(Reporter.INFO,
@@ -180,7 +178,7 @@ public class CheckConfig extends Abstrac
                                   String source) 
     {
        String task = taskName("GetGroupsTask");
-       Object o = envCheck.launch(d, envCheck.getGroupDescriptor(), task);
+       Object o = envCheck.launch(d, task);
        if (o instanceof GroupInfo[]) {
            Message message;
            GroupInfo[] info = (GroupInfo[]) o;

Modified: 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJDK1_4.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJDK1_4.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJDK1_4.java 
(original)
+++ 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJDK1_4.java 
Sun Dec  6 08:23:59 2015
@@ -25,7 +25,6 @@ import com.sun.jini.tool.envcheck.Report
 import com.sun.jini.tool.envcheck.SubVMTask;
 import com.sun.jini.tool.envcheck.Util;
 import java.io.File;
-import com.sun.jini.start.SharedActivationGroupDescriptor;
 
 /**
  * Check that the Java platform is at least version 1.4. This check is applied
@@ -49,27 +48,6 @@ public class CheckJDK1_4 extends Abstrac
     public void run(EnvCheck envCheck) {
        this.envCheck = envCheck;
        checkMainVM();
-       checkGroupVM();
-    }
-
-    /**
-     * Check the activation group VM. If there is a
-     * <code>SharedActivationGroupDescriptor</code> available from the
-     * container, invoke a subtask which verifies that the VM used to run that
-     * group is at least version 1.4.
-     */
-    private void checkGroupVM() {
-       SharedActivationGroupDescriptor gd = envCheck.getGroupDescriptor();
-       if (gd != null) {
-           String source;
-           String serverCommand = gd.getServerCommand();
-           if (serverCommand == null) {
-               source = getString("cmdlinejava", envCheck.getJavaCmd());
-           } else {
-               source = getString("groupjava", serverCommand);
-           }
-           processReturn(envCheck.launch(null, gd, taskName), source);
-       }
     }
 
     /**

Modified: 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJSKPlatform.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJSKPlatform.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJSKPlatform.java
 (original)
+++ 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJSKPlatform.java
 Sun Dec  6 08:23:59 2015
@@ -34,8 +34,6 @@ import java.util.jar.JarFile;
 import java.util.jar.Manifest;
 import java.util.StringTokenizer;
 
-import com.sun.jini.start.SharedActivationGroupDescriptor;
-
 /**
  * Check whether <code>jsk-platform.jar</code> is in the classpath
  * of the command-line being analyzed, and if the activation group
@@ -64,11 +62,6 @@ public class CheckJSKPlatform extends Ab
            classpath = envCheck.getClasspath();
            checkPlatform(classpath, getString("cmdline"));
        }
-       SharedActivationGroupDescriptor gd = envCheck.getGroupDescriptor();
-       if (gd != null) {
-           classpath = gd.getClasspath();
-           checkPlatform(classpath, getString("grouppath"));
-       }
     }
 
     /**

Modified: 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJSKPolicy.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJSKPolicy.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJSKPolicy.java
 (original)
+++ 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJSKPolicy.java
 Sun Dec  6 08:23:59 2015
@@ -24,7 +24,6 @@ import com.sun.jini.tool.envcheck.Report
 import com.sun.jini.tool.envcheck.Reporter.Message;
 import com.sun.jini.tool.envcheck.SubVMTask;
 import com.sun.jini.tool.envcheck.Util;
-import com.sun.jini.start.SharedActivationGroupDescriptor;
 
 /**
  * Check whether <code>jsk-policy.jar</code> is installed in the extensions
@@ -49,11 +48,7 @@ public class CheckJSKPolicy extends Abst
      */
     public void run(EnvCheck envCheck) {
        this.envCheck = envCheck;
-       checkPolicy(null);
-       SharedActivationGroupDescriptor gd = envCheck.getGroupDescriptor();
-       if (gd != null) {
-           checkPolicy(gd);
-       }
+       checkPolicy();
     }
 
     /**
@@ -63,11 +58,10 @@ public class CheckJSKPolicy extends Abst
      *
      * @param gd the group descriptor, or <code>null</code>
      */
-    private void checkPolicy(SharedActivationGroupDescriptor gd) {
+    private void checkPolicy() {
        String source = 
-           gd == null ? getString("vmsource")
-                      : getString("groupsource", gd.getServerCommand());
-       Object o = envCheck.launch(null, gd, taskName("JSKPolicyTask"));
+           getString("vmsource");
+       Object o = envCheck.launch(null, taskName("JSKPolicyTask"));
        if (o instanceof Boolean) {
            Message message;
            if (((Boolean) o).booleanValue()) {

Modified: 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJsseProps.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJsseProps.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJsseProps.java
 (original)
+++ 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckJsseProps.java
 Sun Dec  6 08:23:59 2015
@@ -17,9 +17,6 @@
  */
 package com.sun.jini.tool.envcheck.plugins;
 
-import com.sun.jini.start.SharedActivationGroupDescriptor;
-import com.sun.jini.start.SharedActivatableServiceDescriptor;
-
 import com.sun.jini.tool.envcheck.AbstractPlugin;
 import com.sun.jini.tool.envcheck.EnvCheck;
 import com.sun.jini.tool.envcheck.Plugin;
@@ -106,19 +103,11 @@ public class CheckJsseProps extends Abst
            return;
        }
        this.envCheck = envCheck;
-       checkProvider(null);
-       checkTrustStore(null);
-       checkDiscoveryStore(null);
-       checkKeyStore(null);
-       checkLoginConfigs(null);
-       SharedActivationGroupDescriptor gd = envCheck.getGroupDescriptor();
-       if (gd != null) {
-           checkProvider(gd);
-           checkTrustStore(gd);
-           checkDiscoveryStore(gd);
-           checkKeyStore(gd);
-           checkLoginConfigs(gd);
-       }
+       checkProvider();
+       checkTrustStore();
+       checkDiscoveryStore();
+       checkKeyStore();
+       checkLoginConfigs();
     }
 
     /**
@@ -129,8 +118,8 @@ public class CheckJsseProps extends Abst
      * @param gd the group descriptor
      * @return the source text
      */
-    private String getSource(SharedActivationGroupDescriptor gd) {
-       return gd == null ? getString("cmdlineVM") : getString("groupVM");
+    private String getSource() {
+       return getString("cmdlineVM");
     }
 
     /**
@@ -151,11 +140,11 @@ public class CheckJsseProps extends Abst
      * @param gd the group descriptor, or <code>null</code> to test the 
      *        command line
      */
-    private void checkTrustStore(SharedActivationGroupDescriptor gd) {
-       String source = getSource(gd);
+    private void checkTrustStore() {
+       String source = getSource();
        String name = "javax.net.ssl.trustStore"; // the property name
        String phrase =  getString("truststore"); // brief description
-       if (checkExistance(gd, name, phrase, source)) {
+       if (checkExistance(name, phrase, source)) {
            Message message;
            Object lobj = 
                envCheck.launch(fileAccessTask, args(name, phrase));
@@ -186,14 +175,14 @@ public class CheckJsseProps extends Abst
      * @param gd the group descriptor, or <code>null</code> to test the 
      *        command line
      */
-    private void checkDiscoveryStore(SharedActivationGroupDescriptor gd) {
-       String source = getSource(gd);
+    private void checkDiscoveryStore() {
+       String source = getSource();
        String name = "com.sun.jini.discovery.x500.trustStore";
        String phrase = getString("discoverystore");
-       if (checkExistance(gd, name, phrase, source)) {
+       if (checkExistance(name, phrase, source)) {
            Message message;
            Object lobj = 
-               envCheck.launch(null, gd, fileAccessTask, args(name, phrase));
+               envCheck.launch(null, fileAccessTask, args(name, phrase));
            if (lobj == null) {
                message = new Message(Reporter.INFO,
                                      getString("discoverystoreOK"),
@@ -221,14 +210,14 @@ public class CheckJsseProps extends Abst
      * @param gd the group descriptor, or <code>null</code> to test the 
      *        command line
      */
-    private void checkKeyStore(SharedActivationGroupDescriptor gd) {
-       String source = getSource(gd);
+    private void checkKeyStore() {
+       String source = getSource();
        String name = "javax.net.ssl.keyStore";
        String phrase = getString("keystore");
-       if (checkExistance(gd, name, phrase, source)) {
+       if (checkExistance(name, phrase, source)) {
            Message message;
            Object lobj = 
-               envCheck.launch(null, gd, fileAccessTask, args(name, phrase));
+               envCheck.launch(null, fileAccessTask, args(name, phrase));
            if (lobj == null) {
                message = new Message(Reporter.INFO,
                                      getString("keystoreOK"),
@@ -256,10 +245,10 @@ public class CheckJsseProps extends Abst
      * @param gd the group descriptor, or <code>null</code> to test the 
      *        command line
      */
-    private void checkLoginConfigs(SharedActivationGroupDescriptor gd) {
-       String source = getSource(gd);
+    private void checkLoginConfigs() {
+       String source = getSource();
        Object lobj = 
-           envCheck.launch(null, gd, taskName("GetGroupLoginConfigs"));
+           envCheck.launch(null, taskName("GetGroupLoginConfigs"));
        if (lobj instanceof Throwable) {
            handleUnexpectedSubtaskReturn(lobj, source);
            return;
@@ -292,7 +281,7 @@ public class CheckJsseProps extends Abst
            }
            Reporter.print(message, source + " " + desc);
        }
-       lobj = envCheck.launch(null, gd, taskName("CheckLoginConfigInit"));
+       lobj = envCheck.launch(null, taskName("CheckLoginConfigInit"));
        if (lobj == null) {
            message = new Message(Reporter.INFO,
                                  getString("loginInitOK"),
@@ -391,13 +380,11 @@ public class CheckJsseProps extends Abst
      * @param source the source descriptive text
      * @return <code>true</code> if the property is defined
      */
-    private boolean checkExistance(SharedActivationGroupDescriptor gd,
-                                  String propName, 
+    private boolean checkExistance(String propName, 
                                   String desc, 
                                   String source) {
        
-       Properties p = (gd == null ? System.getProperties()
-                                  : gd.getServerProperties());
+       Properties p = System.getProperties();
        if (p == null || p.getProperty(propName) == null) {
            Message message = 
                new Message(Reporter.WARNING,
@@ -414,9 +401,9 @@ public class CheckJsseProps extends Abst
      * <code>DynamicPolicyProvider</code>. Done for the tool VM and for the
      * group VM if a <code>SharedActivationGroupDescriptor</code> exists.
      */
-    private void checkProvider(SharedActivationGroupDescriptor gd) {
-       String source = getSource(gd);
-       Object lobj = envCheck.launch(null, gd, taskName("CheckProviderTask"));
+    private void checkProvider() {
+       String source = getSource();
+       Object lobj = envCheck.launch(null, taskName("CheckProviderTask"));
        if (lobj instanceof Boolean) {
            Message message;
            if (((Boolean) lobj).booleanValue()) {

Modified: 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckLoggingConfig.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckLoggingConfig.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckLoggingConfig.java
 (original)
+++ 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckLoggingConfig.java
 Sun Dec  6 08:23:59 2015
@@ -17,7 +17,6 @@
  */
 package com.sun.jini.tool.envcheck.plugins;
 
-import com.sun.jini.start.SharedActivationGroupDescriptor;
 import com.sun.jini.tool.envcheck.AbstractPlugin;
 import com.sun.jini.tool.envcheck.Plugin;
 import com.sun.jini.tool.envcheck.EnvCheck;
@@ -42,11 +41,7 @@ public class CheckLoggingConfig extends
 
     public void run(EnvCheck envCheck) {
        this.envCheck = envCheck;
-       checkLoggingConfig(null);
-       SharedActivationGroupDescriptor gd = envCheck.getGroupDescriptor();
-       if (gd != null) {
-           checkLoggingConfig(gd);
-       }
+       checkLoggingConfig();
     }
 
     /**
@@ -55,12 +50,10 @@ public class CheckLoggingConfig extends
      * @param gd the group descriptor, or <code>null</code> to check
      *           the command line
      */
-    private void checkLoggingConfig(SharedActivationGroupDescriptor gd) {
+    private void checkLoggingConfig() {
        Message message;
-       String source = gd == null ? getString("cmdline") 
-                                  : getString("groupVM");
-       Properties p = gd == null ? envCheck.getProperties()
-                                 : gd.getServerProperties();
+       String source = getString("cmdline");
+       Properties p = envCheck.getProperties();
        String task = FileAccessCheckTask.class.getName();
        String name = "java.util.logging.config.file";
        String phrase = getString("loggingconfig");
@@ -71,7 +64,7 @@ public class CheckLoggingConfig extends
                                  getString("loggingconfigExp"));
        } else {
            String[] args = new String[]{name, phrase};
-           Object lobj = envCheck.launch(null, gd, task, args);
+           Object lobj = envCheck.launch(null, task, args);
            if (lobj == null) {
                message = new Message(Reporter.INFO,
                                      getString("okconfig"),

Modified: 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckPolicy.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckPolicy.java?rev=1718151&r1=1718150&r2=1718151&view=diff
==============================================================================
--- 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckPolicy.java 
(original)
+++ 
river/jtsk/branches/2.2/src/com/sun/jini/tool/envcheck/plugins/CheckPolicy.java 
Sun Dec  6 08:23:59 2015
@@ -38,8 +38,6 @@ import java.util.ArrayList;
 import java.util.Properties;
 import java.util.Enumeration;
 import com.sun.jini.start.ServiceDescriptor;
-import com.sun.jini.start.SharedActivatableServiceDescriptor;
-import com.sun.jini.start.SharedActivationGroupDescriptor;
 import com.sun.jini.start.NonActivatableServiceDescriptor;
 
 /**
@@ -153,26 +151,18 @@ public class CheckPolicy extends Abstrac
     private void checkDescriptor(ServiceDescriptor d) {
        String policy;
        NonActivatableServiceDescriptor nad = null;
-       SharedActivationGroupDescriptor gd = null;
        String source = null;
-       if (d instanceof SharedActivationGroupDescriptor) {
-           gd = (SharedActivationGroupDescriptor) d;
-           policy = gd.getPolicy();
-           source = getString("for", 
-                             policy,
-                             "SharedActivationGroupDescriptor");
-       } else {
-           nad = (NonActivatableServiceDescriptor) d;
-            gd = envCheck.getGroupDescriptor();
-           policy = nad.getPolicy();
-           source = getString("for", 
-                              policy,
-                              nad.getImplClassName());
-       }
+
+        nad = (NonActivatableServiceDescriptor) d;
+        policy = nad.getPolicy();
+        source = getString("for", 
+                           policy,
+                           nad.getImplClassName());
+       
        if (!policyAccessible(policy, source)) {
            return; 
        }
-       Object o = envCheck.launch(nad, gd, taskName("AllPermissionsTask"));
+       Object o = envCheck.launch(nad, taskName("AllPermissionsTask"));
        if (o instanceof String) {
            Message message = new Message(Reporter.ERROR,
                                          getString("parseerror", o),


Reply via email to