river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter_firmst...@apache.org
Subject svn commit: r1588431 - in /river/jtsk/skunk/qa_refactor/trunk: qa/src/com/sun/jini/qa/harness/ qa/src/com/sun/jini/test/spec/lookupservice/ qa/src/com/sun/jini/test/spec/lookupservice/test_set00/ qa/src/com/sun/jini/test/spec/lookupservice/test_set01/ ...
Date Fri, 18 Apr 2014 09:15:59 GMT
Author: peter_firmstone
Date: Fri Apr 18 09:15:58 2014
New Revision: 1588431

URL: http://svn.apache.org/r1588431
Log:
Increased Reggie scalability for client remote event notifications, event notification executor is now multi threaded.  In response client code is now expected to deal with out of order event arrival.  ServiceDiscoveryManager and some specification compliance tests in the qa suite, now utilize a Comparator to order remote event notifications prior to processing.  This complies with the Jini Event Specification.

Replaced Vector parameters in some methods in the qa suite with List, without changing test functionality.

Reorganized NonActivatableGroupImpl due to some deadlocks experienced occasionally in some tests during classloading.

Added:
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/DestroyThread.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/GroupImpl.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/RemoteEventComparator.java
Modified:
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/NonActivatableGroupImpl.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestUtils.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrAdd.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrDel.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrMod.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNonNull.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNull.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNonNull.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNull.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNonNull.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNull.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcLeaseExp.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcReg.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNonNull.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNull.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntrySrvcReg.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnAttrSet.java
    river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnComboAttrSet.java
    river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java
    river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/ServiceStarter.java
    river/jtsk/skunk/qa_refactor/trunk/src/net/jini/jeri/AbstractILFactory.java
    river/jtsk/skunk/qa_refactor/trunk/src/net/jini/jeri/BasicILFactory.java
    river/jtsk/skunk/qa_refactor/trunk/src/net/jini/lookup/ServiceDiscoveryManager.java

Added: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/DestroyThread.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/DestroyThread.java?rev=1588431&view=auto
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/DestroyThread.java (added)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/DestroyThread.java Fri Apr 18 09:15:58 2014
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+package com.sun.jini.qa.harness;
+
+import net.jini.export.Exporter;
+
+/**
+ * A thread which unexports and destroys the group after a 2 second delay
+ */
+class DestroyThread extends Thread {
+    final Exporter exporter;
+
+    /** Create a non-daemon thread */
+    public DestroyThread(Exporter exporter) {
+        super("destroy");
+        this.exporter = exporter;
+    }
+
+    public void run() {
+        try {
+            Thread.sleep(2000);
+        } catch (InterruptedException e) {
+            this.interrupt();
+        } finally {
+            exporter.unexport(true);
+            System.exit(0);
+        }
+    }
+    
+}

Added: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/GroupImpl.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/GroupImpl.java?rev=1588431&view=auto
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/GroupImpl.java (added)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/GroupImpl.java Fri Apr 18 09:15:58 2014
@@ -0,0 +1,132 @@
+/*
+ * 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.
+ */
+
+package com.sun.jini.qa.harness;
+
+import com.sun.jini.start.NonActivatableServiceDescriptor;
+import java.rmi.RemoteException;
+import java.rmi.server.ExportException;
+import java.util.ArrayList;
+import net.jini.config.Configuration;
+import net.jini.config.ConfigurationException;
+import net.jini.config.ConfigurationProvider;
+import net.jini.export.Exporter;
+import net.jini.jeri.BasicILFactory;
+import net.jini.jeri.BasicJeriExporter;
+import net.jini.jeri.tcp.TcpServerEndpoint;
+
+/**
+ * The implementation of NonActivatableGroup.
+ */
+class GroupImpl implements NonActivatableGroup {
+    /** the proxy resulting from exporting the group */
+    private Object proxy;
+    /** the groups exporter */
+    private final Exporter exporter;
+    /** store service references here to ensure no GC interference */
+    private final ArrayList serviceList;
+
+    /**
+     * Construct a <code>NonActivatableGroup</code>. Instances export themselves
+     * at construction time using a <code>BasicJeriExporter</code>.
+     */
+    public GroupImpl() {
+        this(new BasicJeriExporter(TcpServerEndpoint.getInstance(0), new BasicILFactory()));
+    }
+
+    private GroupImpl(Exporter exporter) {
+        this.serviceList = new ArrayList();
+        this.exporter = exporter;
+    }
+
+    void export() {
+        try {
+            synchronized (this) {
+                proxy = exporter.export(this);
+            }
+        } catch (ExportException e) {
+            e.printStackTrace();
+            try {
+                Thread.sleep(5000);
+            } catch (Exception e2) {
+            }
+            throw new RuntimeException("Export of group failed", e);
+        }
+    }
+
+    /**
+     * Return the proxy for the NonActivatableGroup remote object
+     */
+    synchronized Object getProxy() {
+        return proxy;
+    }
+
+    /**
+     * Stop the group. A thread is started to perform the destroy.
+     *
+     * @throws RemoteException never
+     */
+    @Override
+    public void stop() throws RemoteException {
+        new DestroyThread(exporter).start();
+    }
+
+    /**
+     * Start a service. A NonActivatableServiceDescriptor is constructed
+     * using the given codebase, policyFile, classpath, serviceImpl,
+     * and configArgs. The descriptors create method is called passing
+     * a configuration obtained using the given starterConfigName.
+     * The proxy is extracted from the returned Created object and
+     * returned.
+     *
+     * @param codebase the service codebase
+     * @param policyFile the service policy file
+     * @param classpath the service classpath
+     * @param serviceImpl the service implementation class name
+     * @param configArgs the configuration arguments passed to the service
+     * @param starterConfigName the name of the starter configuration file
+     *
+     * @return the proxy of the started service
+     * @throws RemoteException if the service cannot be started
+     */
+    @Override
+    public Object startService(String codebase, String policyFile, String classpath, String serviceImpl, String[] configArgs, String starterConfigName, ServiceDescriptorTransformer transformer) throws RemoteException {
+        NonActivatableServiceDescriptor desc = new NonActivatableServiceDescriptor(codebase, policyFile, classpath, serviceImpl, configArgs);
+        Configuration starterConfig = null;
+        if (starterConfigName != null) {
+            try {
+                starterConfig = ConfigurationProvider.getInstance(new String[]{starterConfigName});
+            } catch (ConfigurationException e) {
+                throw new RemoteException("Starter configuration problem", e);
+            }
+        }
+        if (transformer != null) {
+            desc = (NonActivatableServiceDescriptor) transformer.transform(desc);
+        }
+        try {
+            NonActivatableServiceDescriptor.Created created = (NonActivatableServiceDescriptor.Created) desc.create(starterConfig);
+            synchronized (this) {
+                serviceList.add(created);
+            }
+            return created.proxy;
+        } catch (Exception e) {
+            throw new RemoteException("Create failed", e);
+        }
+    }
+    
+}

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/NonActivatableGroupImpl.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/NonActivatableGroupImpl.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/NonActivatableGroupImpl.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/qa/harness/NonActivatableGroupImpl.java Fri Apr 18 09:15:58 2014
@@ -17,29 +17,12 @@
  */
 package com.sun.jini.qa.harness;
 
-import com.sun.jini.start.NonActivatableServiceDescriptor;
-import com.sun.jini.start.NonActivatableServiceDescriptor.Created;
 
 import java.io.IOException;
 import java.io.ObjectOutputStream;
 import java.io.PrintStream;
 import java.rmi.MarshalledObject;
-import java.rmi.RemoteException;
-import java.rmi.server.ExportException;
-import java.util.ArrayList;
 import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import net.jini.config.Configuration;
-import net.jini.config.ConfigurationException;
-import net.jini.config.ConfigurationProvider;
-import net.jini.export.Exporter;
-import net.jini.jeri.BasicILFactory;
-import net.jini.jeri.BasicJeriExporter;
-import net.jini.jeri.InvocationLayerFactory;
-import net.jini.jeri.tcp.TcpServerEndpoint;
-import net.jini.jrmp.JrmpExporter;
-import org.apache.river.api.security.CombinerSecurityManager;
 
 /**
  * A container for nonactivatable services. This class is the
@@ -59,7 +42,7 @@ class NonActivatableGroupImpl {
     private static PrintStream origErr;
 
     /** the reference to the group, save to ensure it won't be GC'd */
-    private static GroupImpl group;
+    private static NonActivatableGroup nonActGroup;
 
     /**
      * Set up the VM to act as a NonActivatableGroup and
@@ -76,10 +59,9 @@ class NonActivatableGroupImpl {
     public static void main(String[] args) {
 	origErr = System.err;
 	System.setErr(System.out);
-	if (System.getSecurityManager() == null) {
-	    System.setSecurityManager(new CombinerSecurityManager());
-	}
-	group = new GroupImpl();
+	GroupImpl group = new GroupImpl();
+	group.export();
+        nonActGroup = group;
 	try {
 	    ObjectOutputStream os = new ObjectOutputStream(origErr);
 	    os.writeObject(new MarshalledObject(group.getProxy()));
@@ -91,145 +73,4 @@ class NonActivatableGroupImpl {
             System.exit(1);
         }
     }
-
-    /**
-     * The implementation of NonActivatableGroup.
-     */
-    private static class GroupImpl implements NonActivatableGroup {
-
-	/** the proxy resulting from exporting the group */
-	private Object proxy;
-
-	/** the groups exporter */
-	private Exporter exporter;
-
-	/** store service references here to ensure no GC interference */
-	private ArrayList serviceList = new ArrayList();
-
-	/**
-	 * Construct a <code>NonActivatableGroup</code>. Instances export themselves
-	 * at construction time using a <code>BasicJeriExporter</code>.
-	 */
-	public GroupImpl() {
-            this (new BasicJeriExporter(TcpServerEndpoint.getInstance(0), new BasicILFactory()));
-	    export();
-	}
-        
-        private GroupImpl(Exporter exporter){
-           this.exporter = exporter;
-        }
-        
-        private void export(){
-            try {
-                synchronized (this){
-                    proxy = exporter.export(this);
-                }
-	    } catch (ExportException e) {
-		e.printStackTrace();
-		try {Thread.sleep(5000);} catch (Exception e2){}
-		throw new RuntimeException("Export of group failed", e);
-	    }
-        }
-        
-	/**
-	 * Return the proxy for the NonActivatableGroup remote object
-	 */
-	synchronized Object getProxy() {
-	     return proxy;
-	}
-
-	/**
-	 * Stop the group. A thread is started to perform the destroy.
-	 *
-	 * @throws RemoteException never
-	 */
-	public void stop() throws RemoteException {
-	    new DestroyThread(exporter).start();
-	}
-
-	/** 
-	 * Start a service. A NonActivatableServiceDescriptor is constructed
-	 * using the given codebase, policyFile, classpath, serviceImpl,
-	 * and configArgs. The descriptors create method is called passing
-	 * a configuration obtained using the given starterConfigName.
-	 * The proxy is extracted from the returned Created object and
-	 * returned.
-	 * 
-	 * @param codebase the service codebase
-	 * @param policyFile the service policy file
-	 * @param classpath the service classpath
-	 * @param serviceImpl the service implementation class name
-	 * @param configArgs the configuration arguments passed to the service
-	 * @param starterConfigName the name of the starter configuration file
-	 *
-	 * @return the proxy of the started service
-	 * @throws RemoteException if the service cannot be started
-	 */
-	public Object startService(String codebase,
-				   String policyFile,
-				   String classpath,
-				   String serviceImpl,
-				   String[] configArgs,
-				   String starterConfigName,
-				   ServiceDescriptorTransformer transformer) 
-	    throws RemoteException
-	{
-	    
-	    NonActivatableServiceDescriptor desc = 
-		new NonActivatableServiceDescriptor(codebase,
-						    policyFile,
-						    classpath,
-						    serviceImpl,
-						    configArgs);
-	    Configuration starterConfig = null;
-	    if (starterConfigName != null) {
-		try {
-		    starterConfig = 
-			ConfigurationProvider.getInstance(
-			      new String[]{starterConfigName});
-		} catch (ConfigurationException e) {
-		    throw new RemoteException("Starter configuration problem",
-					      e);
-		}
-	    }
-	    if (transformer != null) {
-		desc = (NonActivatableServiceDescriptor) 
-		       transformer.transform(desc);
-	    }
-	    try {
-		Created created = (Created) desc.create(starterConfig);
-                synchronized (this){
-                    serviceList.add(created);
-                }
-		return created.proxy;
-	    } catch (Exception e) {
-		throw new RemoteException("Create failed", e);
-	    }
-	}
-    }
-
-    /**
-     * A thread which unexports and destroys the group after a 2 second delay
-     */
-    private static class DestroyThread extends Thread {
-	
-	final Exporter exporter;
-
-        /** Create a non-daemon thread */
-        public DestroyThread(Exporter exporter) {
-            super("destroy");
-	    this.exporter = exporter;
-        }
-
-	public void run() {
-	    try {
-		Thread.sleep(2000);
-	    } catch (InterruptedException e) {
-                this.interrupt();
-	    } finally {
-                exporter.unexport(true);
-                System.exit(0);
-            }
-	}
-    }
 }

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestUtils.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestUtils.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestUtils.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestUtils.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,8 @@ import java.lang.reflect.InvocationTarge
 import com.sun.jini.qa.harness.QAConfig;
 import com.sun.jini.qa.harness.TestException;
 import com.sun.jini.qa.harness.QATestEnvironment;
+import java.util.Collections;
+import java.util.List;
 
 import java.util.logging.Logger;
 import java.util.logging.Level;
@@ -453,10 +455,12 @@ public class QATestUtils {
      *  have arrived. The test in this method depends on the semantics of 
      *  event-notification. That is, it will use the fact that if the events
      *  were generated for each service class in sequence (which they were),
-     *  then the events will arrive in the same sequence. This means we can
-     *  expect, when examining the event corresponding to index i, that the
-     *  serviceID returned in the ServiceEvent should correspond to the i_th
-     *  service registered. If it does not, then failure is declared.
+     *  although the events may arrive out of order, they can be arranged
+     *  back into the same sequence using RemoteEventComparator. 
+     *  This means we can expect, when examining the event corresponding 
+     *  to index i, that the serviceID returned in the ServiceEvent should 
+     *  correspond to the i_th service registered. If it does not,
+     *  remote events are missing and failure is declared.
      *
      *  This method is currently employed by the following test classes:
      *
@@ -465,36 +469,37 @@ public class QATestUtils {
      *                  NotifyOnAttrDel
      *                  NotifyOnSrvcLeaseExpiration
      *
-     *  @param eventVector vector containing the events to test
+     *  @param events vector containing the events to test
      *  @param nExpectedEvnts number of events expected
      *  @param expectedTransition the expected event transition
      *  @param serviceRegs array of ServiceRegistrations of each service
      *  @exception TestException usually indicates a failure
      */
-    public static void verifyEventVector(Vector eventVector,
+    public static void verifyEventVector(List<ServiceEvent> events,
                                          int nExpectedEvnts,
                                          int expectedTransition,
                                          ServiceRegistration[] serviceRegs)
                                                          throws Exception
     {
         ServiceEvent evnt = null;
-        if (eventVector.size() != nExpectedEvnts) {
+        if (events.size() != nExpectedEvnts) {
             throw new TestException("# of Events Received ("+
-                                             eventVector.size()+
+                                             events.size()+
                                              ") != # of Events Expected ("+
                                              nExpectedEvnts+")");
 	} else {
+            Collections.sort(events, new RemoteEventComparator());
             ServiceID evntSrvcID;
             ServiceID expdSrvcID;
             ServiceID handbackSrvcID;
-	    for(int i=0; i<eventVector.size(); i++) {
-                evnt = (ServiceEvent)eventVector.elementAt(i);
+	    for(int i=0; i<events.size(); i++) {
+                evnt = (ServiceEvent)events.get(i);
                 if (evnt == null) {
                     throw new TestException
                              ("null Event returned from Vector at element "+i);
 	   	} else {
                     if (evnt.getTransition() != expectedTransition) {
-			dumpEventIDs(eventVector, serviceRegs);
+			dumpEventIDs(events, serviceRegs);
                         throw new TestException("Unexpected Transition returned ("+
 						evnt.getTransition()+")");
 		    } else {
@@ -521,18 +526,18 @@ public class QATestUtils {
 		}
 	    }
 	}
-	verifyEventItems(eventVector);
+	verifyEventItems(events);
     }
 
-    public static void dumpEventIDs(Vector eventVector,
+    public static void dumpEventIDs(List<ServiceEvent> events,
                                     ServiceRegistration[] serviceRegs)
     {
         ServiceEvent evnt = null;
 	ServiceID evntSrvcID;
 	ServiceID expdSrvcID;
 	ServiceID handbackSrvcID;
-	for(int i=0; i<eventVector.size(); i++) {
-	    evnt = (ServiceEvent)eventVector.elementAt(i);
+	for(int i=0; i<events.size(); i++) {
+	    evnt = (ServiceEvent)events.get(i);
 	    evntSrvcID = evnt.getServiceID();
 	    expdSrvcID = serviceRegs[i].getServiceID();
 	    System.out.println("Expected ID = " + expdSrvcID + ", received ID = " + evntSrvcID);
@@ -549,23 +554,24 @@ public class QATestUtils {
      *  event with the same service ID, as that means the state of
      *  the item recorded in the event was subsequently changed again.
      *
-     *  @param eventVector vector containing the events to test
+     *  @param events List containing the events to test
      *  @exception TestException usually indicates a failure
      */
-    public static void verifyEventItems(Vector eventVector)
+    public static void verifyEventItems(List<ServiceEvent> events)
 	throws Exception
     {
-	ServiceTemplate tmpl = new ServiceTemplate(null, null, null);
+        Collections.sort(events, new RemoteEventComparator());
+	ServiceTemplate tmpl;
     outer:
-	for (int i = 0; i < eventVector.size(); i++) {
-	    ServiceEvent evnt = (ServiceEvent)eventVector.elementAt(i);
-	    for (int j = i + 1; j < eventVector.size(); j++) {
-		ServiceEvent oevnt = (ServiceEvent)eventVector.elementAt(j);
+	for (int i = 0; i < events.size(); i++) {
+	    ServiceEvent evnt = (ServiceEvent)events.get(i);
+	    for (int j = i + 1; j < events.size(); j++) {
+		ServiceEvent oevnt = (ServiceEvent)events.get(j);
 		if (evnt.getServiceID().equals(oevnt.getServiceID()))
 		    continue outer;
 	    }
 	    ServiceItem item = evnt.getServiceItem();
-	    tmpl.serviceID = evnt.getServiceID();
+	    tmpl = new ServiceTemplate(evnt.getServiceID(), null, null);
 	    ServiceRegistrar proxy = (ServiceRegistrar)evnt.getSource();
 	    proxy = (ServiceRegistrar) 
 		    QAConfig.getConfig().prepare("test.reggiePreparer",
@@ -1189,14 +1195,12 @@ public class QATestUtils {
                                          ServiceTemplate[][] template,
                                          SrvcAttrTuple[][][] preEventState,
                                          SrvcAttrTuple[][][] postEventState,
-                                         Vector tuples)
+                                         List tuples)
                                                         throws Exception
     {
         int i=0;
         int j=0;
-        int n=0;
-        SrvcAttrTuple tmplTuple;
-        Vector srvcSupers = new Vector();
+        SrvcAttrTuple tmplTuple;;
 	int s0 = getSrvcIndx(srvcObj,srvcItems);
 	int nAttrs = preEventState[0].length;
 	int trans;
@@ -1222,7 +1226,7 @@ public class QATestUtils {
 				    (postEventState[s0][j][i]);
 				newSrvcIndx = ((s0/nSrvcsPerClass)*nSrvcsPerClass)
 				    -(nSrvcsPerClass*i);
-				tuples.addElement(new SrvcAttrTuple
+				tuples.add(new SrvcAttrTuple
 				    (srvcsForEquals,attrs,
 				     srvcItems[newSrvcIndx].service,
 				     attrs[j][0],
@@ -1242,7 +1246,7 @@ public class QATestUtils {
 				newSrvcIndx = ((s0/nSrvcsPerClass)*nSrvcsPerClass)
 				    -(nSrvcsPerClass*i);
 
-				tuples.addElement(new SrvcAttrTuple
+				tuples.add(new SrvcAttrTuple
 				    (srvcsForEquals,attrs,
 				     srvcItems[newSrvcIndx].service,
 				     attrs[j][0],
@@ -1271,7 +1275,7 @@ public class QATestUtils {
 				    newSrvcIndx =((s0/nSrvcsPerClass)*nSrvcsPerClass)
 					-(nSrvcsPerClass*i);
 
-				    tuples.addElement(new SrvcAttrTuple
+				    tuples.add(new SrvcAttrTuple
 					(srvcsForEquals,attrs,
 					 srvcItems[newSrvcIndx].service,
 					 attrs[j][0],
@@ -1323,7 +1327,7 @@ public class QATestUtils {
                                          Entry[][] attrs,
                                          ServiceTemplate[] template,
                                          SrvcAttrTuple[][][] state,
-                                         Vector tuples)
+                                         List tuples)
                                                         throws Exception
     {
         int trans = ServiceRegistrar.TRANSITION_NOMATCH_MATCH;
@@ -1335,7 +1339,7 @@ public class QATestUtils {
                     Object stateAttr = (state[i][j][0]).getAttrObj();
                     if (stateAttr != null) {
                         if (attrsMatch(stateAttr,tmplAttr,true)) {
-                            tuples.addElement(new SrvcAttrTuple
+                            tuples.add(new SrvcAttrTuple
                                                (srvcsForEquals,attrs,
                                                 (state[i][j][0]).getSrvcObj(),
                                                 stateAttr,
@@ -1356,7 +1360,7 @@ public class QATestUtils {
      *  @param showTime true/false: write elapsed time to standard output
      *  @exception TestException usually indicates a failure
      */
-    public static void verifyEventTuples(Vector receivedTuples, Vector expectedTuples, long maxWaitTime, boolean showTime, Object lock)
+    public static void verifyEventTuples(List receivedTuples, List expectedTuples, long maxWaitTime, boolean showTime, Object lock)
                                                          throws Exception
     {
         int i,j;
@@ -1602,8 +1606,8 @@ public class QATestUtils {
      *  set of received events (this method is shared by the overloaded 
      *  versions of the method verifyEventTuples)
      */
-    private static void verifyEventTupleContent(Vector  receivedTuples,
-                                                Vector  expectedTuples)
+    private static void verifyEventTupleContent(List  receivedTuples,
+                                                List  expectedTuples)
                                                          throws Exception
     {
         int i,j;
@@ -1615,7 +1619,7 @@ public class QATestUtils {
              */
            for(j=0;j<expectedTuples.size();j++) {
                 if((receivedTuples.get(i)).equals(expectedTuples.get(j))) {
-                    expectedTuples.removeElementAt(j);
+                    expectedTuples.remove(j);
                     continue iLoop;
 		}
 	    }

Added: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/RemoteEventComparator.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/RemoteEventComparator.java?rev=1588431&view=auto
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/RemoteEventComparator.java (added)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/RemoteEventComparator.java Fri Apr 18 09:15:58 2014
@@ -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.
+ */
+
+package com.sun.jini.test.spec.lookupservice;
+
+import net.jini.core.event.RemoteEvent;
+import java.util.Comparator;
+
+/**
+ * Comparator to order RemoteEvents by their event id, followed by sequence 
+ * number.
+ * 
+ * Enables clients receiving RemoteEvent's to order those events.
+ * 
+ * @author Peter Firmstone
+ * @since 3.0.0
+ */
+public class RemoteEventComparator implements Comparator<RemoteEvent>{
+
+    @Override
+    public int compare(RemoteEvent o1, RemoteEvent o2) {
+        boolean Null1 = o1 == null;
+        boolean Null2 = o2 == null;
+        if (Null1 && Null2) return 0;
+        if (Null1 && !Null2) return -1;
+        if (!Null1 && Null2) return 1;
+        long eventID1 = o1.getID();
+        long eventID2 = o2.getID();
+        if (eventID1 < eventID2) return -1;
+        if (eventID1 > eventID2) return 1;
+        long seq1 = o1.getSequenceNumber();
+        long seq2 = o2.getSequenceNumber();
+        if (seq1 < seq2) return -1;
+        if (seq1 > seq2) return 1;
+        return 0;
+    }
+    
+}

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrAdd.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrAdd.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrAdd.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrAdd.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.RemoteException;
 import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing only 
  *  a service ID to request notification of MATCH_MATCH|MATCH_NOMATCH events,
@@ -63,11 +64,11 @@ public class NotifyOnAttrAdd extends QAT
         /** Method called remotely by lookup to handle the generated event. */
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
-            evntVec.addElement(srvcEvnt);
+            evntVec.add(srvcEvnt);
         }
     }
 
-    protected final Vector evntVec = new Vector();
+    protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems ;
     private ServiceRegistration[] srvcRegs ;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrDel.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrDel.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrDel.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrDel.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.RemoteException;
 import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing only 
  *  a service ID to request notification of MATCH_MATCH|MATCH_NOMATCH events,
@@ -64,11 +65,11 @@ public class NotifyOnAttrDel extends QAT
         /** Method called remotely by lookup to handle the generated event. */
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
-            evntVec.addElement(srvcEvnt);
+            evntVec.add(srvcEvnt);
         }
     }
 
-    protected final Vector evntVec = new Vector();
+    protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems ;
     private ServiceRegistration[] srvcRegs ;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrMod.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrMod.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrMod.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnAttrMod.java Fri Apr 18 09:15:58 2014
@@ -41,6 +41,7 @@ import java.rmi.StubNotFoundException;
 import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing only 
  *  a service ID to request notification of MATCH_MATCH|MATCH_NOMATCH events,
@@ -61,11 +62,11 @@ public class NotifyOnAttrMod extends QAT
         /** Method called remotely by lookup to handle the generated event. */
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
-            evntVec.addElement(srvcEvnt);
+            evntVec.add(srvcEvnt);
         }
     }
 
-    protected final Vector evntVec = new Vector();
+    protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems ;
     private ServiceRegistration[] srvcRegs ;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set00/NotifyOnSrvcLeaseExpiration.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.Vector;
 import java.io.IOException;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing only 
  *  a service ID to request notification of MATCH_MATCH|MATCH_NOMATCH events,
@@ -64,7 +65,7 @@ public class NotifyOnSrvcLeaseExpiration
         /** Method called remotely by lookup to handle the generated event. */
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
-            evntVec.addElement(srvcEvnt);
+            evntVec.add(srvcEvnt);
         }
     }
 
@@ -83,7 +84,7 @@ public class NotifyOnSrvcLeaseExpiration
         }
     }
 
-    protected final Vector evntVec = new Vector();
+    protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private long srvcLeaseDurMS;
     private ServiceItem[] srvcItems;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNonNull.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNonNull.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNonNull.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNonNull.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing a 
  *  combination of service types and attributes with Non-Null fields to
@@ -67,12 +68,12 @@ public class NotifyOnComboAttrAddNonNull
         /** Method called remotely by lookup to handle the generated event. */
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
-            evntVec.addElement(srvcEvnt);
+            evntVec.add(srvcEvnt);
             try {
                 QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                       (srvcEvnt.getRegistrationObject().get());
 
-                receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                    (srvcItems,addAttrs,
                                                     tuple.getSrvcObj(),
                                                     tuple.getAttrObj(),
@@ -87,9 +88,9 @@ public class NotifyOnComboAttrAddNonNull
 
     protected QATestUtils.SrvcAttrTuple[][][] oldState;
     protected QATestUtils.SrvcAttrTuple[][][] newState;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNull.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNull.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNull.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrAddNull.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /*  This class is used to verify that after using templates containing a 
  *  combination of service types and attributes with all Null fields to
@@ -68,12 +69,12 @@ public class NotifyOnComboAttrAddNull ex
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
             synchronized (NotifyOnComboAttrAddNull.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                 try {
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,addAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -89,9 +90,9 @@ public class NotifyOnComboAttrAddNull ex
 
     protected QATestUtils.SrvcAttrTuple[][][] oldState;
     protected QATestUtils.SrvcAttrTuple[][][] newState;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNonNull.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNonNull.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNonNull.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNonNull.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing a 
  *  combination of service types and attributes with Non-Null fields to
@@ -68,12 +69,12 @@ public class NotifyOnComboAttrDelNonNull
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
             synchronized (NotifyOnComboAttrDelNonNull.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                 try {
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,addAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -89,9 +90,9 @@ public class NotifyOnComboAttrDelNonNull
 
     protected QATestUtils.SrvcAttrTuple[][][] oldState;
     protected QATestUtils.SrvcAttrTuple[][][] newState;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNull.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNull.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNull.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrDelNull.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing a 
  *  combination of service types and attributes with all Null fields to
@@ -68,12 +69,12 @@ public class NotifyOnComboAttrDelNull ex
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
             synchronized (NotifyOnComboAttrDelNull.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                 try {
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,addAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -89,9 +90,9 @@ public class NotifyOnComboAttrDelNull ex
 
     protected QATestUtils.SrvcAttrTuple[][][] oldState;
     protected QATestUtils.SrvcAttrTuple[][][] newState;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNonNull.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNonNull.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNonNull.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNonNull.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing a 
  *  combination of service types and attributes with Non-Null fields to
@@ -69,11 +70,11 @@ public class NotifyOnComboAttrModNonNull
 	    try {
                 ServiceEvent srvcEvnt = (ServiceEvent)ev;
                 synchronized (NotifyOnComboAttrModNonNull.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,modAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -89,9 +90,9 @@ public class NotifyOnComboAttrModNonNull
 
     protected QATestUtils.SrvcAttrTuple[][][] oldState;
     protected QATestUtils.SrvcAttrTuple[][][] newState;
-    protected final Vector expectedTuples = new Vector();
-    protected final Vector receivedTuples = new Vector();
-    protected final Vector evntVec = new Vector();
+    protected final List expectedTuples = new Vector();
+    protected final List receivedTuples = new Vector();
+    protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNull.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNull.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNull.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboAttrModNull.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing a 
  *  combination of service types and attributes with all Null fields to
@@ -68,12 +69,12 @@ public class NotifyOnComboAttrModNull ex
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
             synchronized(NotifyOnComboAttrModNull.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                 try {
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,modAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -89,9 +90,9 @@ public class NotifyOnComboAttrModNull ex
 
     protected QATestUtils.SrvcAttrTuple[][][] oldState;
     protected QATestUtils.SrvcAttrTuple[][][] newState;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcLeaseExp.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcLeaseExp.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcLeaseExp.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcLeaseExp.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing a 
  *  combination of service types and attributes with all Null fields to
@@ -68,12 +69,12 @@ public class NotifyOnComboSrvcLeaseExp e
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
             synchronized (NotifyOnComboSrvcLeaseExp.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                 try {
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,tmplAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -89,9 +90,9 @@ public class NotifyOnComboSrvcLeaseExp e
 
     protected QATestUtils.SrvcAttrTuple[][][] oldState;
     protected QATestUtils.SrvcAttrTuple[][][] newState;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcReg.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcReg.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcReg.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnComboSrvcReg.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing a 
  *  combination of service types and attributes with all Null fields to
@@ -68,12 +69,12 @@ public class NotifyOnComboSrvcReg extend
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
             synchronized (NotifyOnComboSrvcReg.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                 try {
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,tmplAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -89,9 +90,9 @@ public class NotifyOnComboSrvcReg extend
 
     protected QATestUtils.SrvcAttrTuple[][][] oldState;
     protected QATestUtils.SrvcAttrTuple[][][] newState;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNonNull.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNonNull.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNonNull.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNonNull.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing only 
  *  attributes with all non-Null fields to request event notification, and 
@@ -68,12 +69,12 @@ public class NotifyOnEntryAttrAddNonNull
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
             synchronized (NotifyOnEntryAttrAddNonNull.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                 try {
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,tmplAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -88,9 +89,9 @@ public class NotifyOnEntryAttrAddNonNull
     }
 
     protected QATestUtils.SrvcAttrTuple[][][] state;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNull.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNull.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNull.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntryAttrAddNull.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing only 
  *  attributes with all Null fields to request event notification, and upon 
@@ -67,12 +68,12 @@ public class NotifyOnEntryAttrAddNull ex
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
             synchronized (NotifyOnEntryAttrAddNull.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                 try {
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,tmplAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -87,9 +88,9 @@ public class NotifyOnEntryAttrAddNull ex
     }
 
     protected QATestUtils.SrvcAttrTuple[][][] state;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntrySrvcReg.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntrySrvcReg.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntrySrvcReg.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set01/NotifyOnEntrySrvcReg.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing only 
  *  attributes with all Null fields to request event notification, and upon
@@ -67,12 +68,12 @@ public class NotifyOnEntrySrvcReg extend
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
             synchronized (NotifyOnEntrySrvcReg.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                 try {
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,tmplAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -85,9 +86,9 @@ public class NotifyOnEntrySrvcReg extend
     }
 
     protected QATestUtils.SrvcAttrTuple[][][] state;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnAttrSet.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnAttrSet.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnAttrSet.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnAttrSet.java Fri Apr 18 09:15:58 2014
@@ -41,6 +41,7 @@ import java.rmi.StubNotFoundException;
 import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing only 
  *  a service ID to request notification of MATCH_MATCH|MATCH_NOMATCH events,
@@ -64,11 +65,11 @@ public class NotifyOnAttrSet extends QAT
         /** Method called remotely by lookup to handle the generated event. */
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
-            evntVec.addElement(srvcEvnt);
+            evntVec.add(srvcEvnt);
         }
     }
 
-    protected final Vector evntVec = new Vector();
+    protected final List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems ;
     private ServiceRegistration[] srvcRegs ;

Modified: river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnComboAttrSet.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnComboAttrSet.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnComboAttrSet.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/NotifyOnComboAttrSet.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import java.rmi.NoSuchObjectException;
 import java.util.Vector;
 import java.io.IOException;
 import java.io.Serializable;
+import java.util.List;
 
 /** This class is used to verify that after using templates containing a 
  *  combination of service types and attributes with Non-Null fields to
@@ -68,12 +69,12 @@ public class NotifyOnComboAttrSet extend
         public void notify(RemoteEvent ev) {
             ServiceEvent srvcEvnt = (ServiceEvent)ev;
             synchronized (NotifyOnComboAttrSet.this){
-                evntVec.addElement(srvcEvnt);
+                evntVec.add(srvcEvnt);
                 try {
                     QATestUtils.SrvcAttrTuple tuple = (QATestUtils.SrvcAttrTuple)
                                           (srvcEvnt.getRegistrationObject().get());
 
-                    receivedTuples.addElement(new QATestUtils.SrvcAttrTuple
+                    receivedTuples.add(new QATestUtils.SrvcAttrTuple
                                                        (srvcItems,tmplAttrs,
                                                         tuple.getSrvcObj(),
                                                         tuple.getAttrObj(),
@@ -87,9 +88,9 @@ public class NotifyOnComboAttrSet extend
 
     protected QATestUtils.SrvcAttrTuple[][][] oldState;
     protected QATestUtils.SrvcAttrTuple[][][] newState;
-    protected Vector expectedTuples = new Vector();
-    protected Vector receivedTuples = new Vector();
-    protected Vector evntVec = new Vector();
+    protected List expectedTuples = new Vector();
+    protected List receivedTuples = new Vector();
+    protected List<ServiceEvent> evntVec = new Vector<ServiceEvent>();
 
     private ServiceItem[] srvcItems;
     private ServiceItem[] srvcsForEquals;

Modified: river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/reggie/RegistrarImpl.java Fri Apr 18 09:15:58 2014
@@ -17,7 +17,6 @@
  */
 package com.sun.jini.reggie;
 
-import com.sun.jini.action.GetPropertyAction;
 import com.sun.jini.config.Config;
 import com.sun.jini.constants.ThrowableConstants;
 import com.sun.jini.constants.VersionConstants;
@@ -148,7 +147,6 @@ import net.jini.security.BasicProxyPrepa
 import net.jini.security.ProxyPreparer;
 import net.jini.security.TrustVerifier;
 import net.jini.security.proxytrust.ServerProxyTrust;
-import org.apache.river.api.net.Uri;
 import org.apache.river.api.util.Startable;
 import org.apache.river.impl.thread.NamedThreadFactory;
 import org.apache.river.impl.thread.SynchronousExecutors;
@@ -397,9 +395,6 @@ class RegistrarImpl implements Registrar
     private final long unexportWait;
     /** Client subject checker to apply to unicast discovery attempts */
     private final ClientSubjectChecker unicastDiscoverySubjectChecker;
-
-    /** Lock protecting startup and shutdown */
-    //private final ReadyState ready = new ReadyState();
     
     // Not required after start is called.
     private String unicastDiscoveryHost;
@@ -4960,7 +4955,7 @@ class RegistrarImpl implements Registrar
                 "eventNotifierExecutor",
                 ScheduledExecutorService.class, 
                 new ScheduledThreadPoolExecutor(
-                    1,
+                    poolSizeLimit,
                     new NamedThreadFactory("Reggie_Event_Notifier", true)   
                 )
             );

Modified: river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/ServiceStarter.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/ServiceStarter.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/ServiceStarter.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/ServiceStarter.java Fri Apr 18 09:15:58 2014
@@ -42,6 +42,7 @@ import javax.security.auth.login.LoginEx
 import javax.security.auth.Subject;
 
 import com.sun.jini.action.GetIntegerAction;
+import org.apache.river.api.security.CombinerSecurityManager;
 
 /** 
  * This class provides the main routine for starting shared groups,
@@ -303,7 +304,7 @@ public class ServiceStarter {
      */
     synchronized static void ensureSecurityManager() {
         if (System.getSecurityManager() == null) {
-            System.setSecurityManager(new RMISecurityManager());
+            System.setSecurityManager(new CombinerSecurityManager());
         }
     }
 

Modified: river/jtsk/skunk/qa_refactor/trunk/src/net/jini/jeri/AbstractILFactory.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/net/jini/jeri/AbstractILFactory.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/src/net/jini/jeri/AbstractILFactory.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/src/net/jini/jeri/AbstractILFactory.java Fri Apr 18 09:15:58 2014
@@ -499,6 +499,7 @@ public abstract class AbstractILFactory 
      * <p>A subclass should override this method if it adds instance state
      * that affects equality.
      **/
+    @Override
     public boolean equals(Object obj) {
 	return (obj == this ||
 		(obj != null &&

Modified: river/jtsk/skunk/qa_refactor/trunk/src/net/jini/jeri/BasicILFactory.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/net/jini/jeri/BasicILFactory.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/src/net/jini/jeri/BasicILFactory.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/src/net/jini/jeri/BasicILFactory.java Fri Apr 18 09:15:58 2014
@@ -205,6 +205,7 @@ public class BasicILFactory extends Abst
     /**
      * Returns a hash code value for this factory.
      **/
+    @Override
     public int hashCode() {
 	int h = super.hashCode();
 	if (serverConstraints != null) {
@@ -227,6 +228,7 @@ public class BasicILFactory extends Abst
      * object, and the server constraints and permission class are equal to
      * the ones in this object.
      **/
+    @Override
     public boolean equals(Object obj) {
 	if (!super.equals(obj)) {
 	    return false;
@@ -242,9 +244,13 @@ public class BasicILFactory extends Abst
      * Returns a string representation of this factory.
      **/
     public String toString() {
-	return (super.toString() + "[" + serverConstraints +
-		(permissionClass != null ?
-		 ", " + permissionClass.getName() :
-		 "") + "]");
+        StringBuilder sb = new StringBuilder(100);
+        sb.append(super.toString())
+          .append('[')
+          .append(serverConstraints);
+        if (permissionClass != null) 
+            sb.append(", ").append(permissionClass.getName());      
+        sb.append(']');
+        return sb.toString();
     }
 }

Modified: river/jtsk/skunk/qa_refactor/trunk/src/net/jini/lookup/ServiceDiscoveryManager.java
URL: http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/net/jini/lookup/ServiceDiscoveryManager.java?rev=1588431&r1=1588430&r2=1588431&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/src/net/jini/lookup/ServiceDiscoveryManager.java (original)
+++ river/jtsk/skunk/qa_refactor/trunk/src/net/jini/lookup/ServiceDiscoveryManager.java Fri Apr 18 09:15:58 2014
@@ -29,11 +29,13 @@ import java.rmi.RemoteException;
 import java.rmi.server.ExportException;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
+import java.util.Queue;
 import java.util.Random;
 import java.util.Set;
 import java.util.concurrent.BlockingQueue;
@@ -41,10 +43,12 @@ import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ConcurrentSkipListSet;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
 import java.util.concurrent.FutureTask;
 import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.PriorityBlockingQueue;
 import java.util.concurrent.RunnableFuture;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
@@ -59,6 +63,7 @@ import net.jini.core.entry.Entry;
 import net.jini.core.event.EventRegistration;
 import net.jini.core.event.RemoteEvent;
 import net.jini.core.event.RemoteEventListener;
+import net.jini.core.event.UnknownEventException;
 import net.jini.core.lease.Lease;
 import net.jini.core.lookup.ServiceEvent;
 import net.jini.core.lookup.ServiceID;
@@ -1057,6 +1062,28 @@ public class ServiceDiscoveryManager {
 	}//end LookupCacheImpl.removeUselessTask
     }
     
+    private static class RemoteEventComparator implements Comparator<RemoteEvent>{
+
+        @Override
+        public int compare(RemoteEvent o1, RemoteEvent o2) {
+            boolean Null1 = o1 == null;
+            boolean Null2 = o2 == null;
+            if (Null1 && Null2) return 0;
+            if (Null1 && !Null2) return -1;
+            if (!Null1 && Null2) return 1;
+            long eventID1 = o1.getID();
+            long eventID2 = o2.getID();
+            if (eventID1 < eventID2) return -1;
+            if (eventID1 > eventID2) return 1;
+            long seq1 = o1.getSequenceNumber();
+            long seq2 = o2.getSequenceNumber();
+            if (seq1 < seq2) return -1;
+            if (seq1 > seq2) return 1;
+            return 0;
+        }
+
+    }
+    
     /** Internal implementation of the LookupCache interface. Instances of
      *  this class are used in the blocking versions of lookup() and are
      *  returned by createLookupCache.
@@ -1070,7 +1097,16 @@ public class ServiceDiscoveryManager {
         private final class LookupListener implements RemoteEventListener,
                                                       ServerProxyTrust
         {
+            /* Buffer to avoid unnecessary lookup task calls, used for
+             * reordering out of order events. */
+            private final BlockingQueue<RemoteEvent> eventQueue;
+            
 	    public LookupListener() {
+                this.eventQueue = 
+                        new PriorityBlockingQueue<RemoteEvent>(
+                                11,
+                                new RemoteEventComparator()
+                        );
             }//end constructor
             
             // Moved export from constructor and LookupCacheImpl constructor
@@ -1079,16 +1115,31 @@ public class ServiceDiscoveryManager {
                 return (RemoteEventListener)lookupListenerExporter.export(this);
             }
 
-	    public void notify(RemoteEvent evt) {
-		ServiceEvent theEvent = (ServiceEvent)evt;
+            @Override
+	    public void notify(RemoteEvent evt) throws UnknownEventException,
+                    java.rmi.RemoteException {
+                if (!(evt instanceof ServiceEvent)) throw 
+                    new UnknownEventException("ServiceEvent required,not: " 
+                            + evt.toString());
+                eventQueue.offer(evt);
+                ServiceEvent theEvent = null;
+                try {
+                    Thread.sleep(200L);
+                    theEvent = (ServiceEvent) eventQueue.poll();
+                } catch (InterruptedException ex) {
+                    // Restore Interrupt.
+                    Thread.currentThread().interrupt();
+                    if (theEvent == null) throw new RemoteException(
+                        "RemoteEventListener interrupted while processing event"
+                    );
+                }
 		notifyServiceMap( theEvent.getSource(),
 				  theEvent.getID(),
 				  theEvent.getSequenceNumber(),
 				  theEvent.getServiceID(),
 				  theEvent.getServiceItem(),
 				  theEvent.getTransition() );
-	    }//end notify
-
+	    }
             /** Returns a <code>TrustVerifier</code> which can be used to
              *  verify that a given proxy to this listener can be trusted.
              */



Mime
View raw message