Author: peter_firmstone
Date: Mon Jul  8 08:37:45 2013
New Revision: 1500606

URL: http://svn.apache.org/r1500606
Log:
Moved Starter from com.sun.jini.start and renamed it to 
org.apache.river.api.util.Commission, to avoid issues with ClassLoader 
visibility and allow application to other purposes.

Added:
    
river/jtsk/skunk/qa_refactor/trunk/src/org/apache/river/api/util/Commission.java
      - copied, changed from r1488180, 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/Starter.java
Removed:
    river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/Starter.java
Modified:
    
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.java
    
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestGeneratorImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestListenerImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestPullListenerImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/start/BadServiceProxyAccessorImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/start/TestServiceImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/services/lookupsimulator/LookupSimulatorImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestRegistrar.java
    
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/LeaseMapRenew.java
    river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/fiddler/FiddlerImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mahalo/TxnManagerImpl.java
    river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mercury/MailboxImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OutriggerServerImpl.java
    
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OutriggerServerWrapper.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/ActivateWrapper.java
    
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/NonActivatableServiceDescriptor.java
    
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/ServiceStarter.java
    
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/SharedGroupImpl.java
    river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/tool/ClassServer.java

Modified: 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/joinmanager/LeaseRenewDurRFE.java
 Mon Jul  8 08:37:45 2013
@@ -78,7 +78,7 @@ import com.sun.jini.config.Config;
 import com.sun.jini.config.ConfigUtil;
 import com.sun.jini.logging.Levels;
 import com.sun.jini.qa.harness.Test;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 
 import net.jini.activation.ActivationExporter;
 import net.jini.activation.ActivationGroup;
@@ -1063,7 +1063,7 @@ public class LeaseRenewDurRFE extends Ab
     static class RemoteTestServiceImpl implements ServerProxyTrust,
                                                   ProxyAccessor,
                                                   RemoteTestServiceInterface,
-                                                  Starter
+                                                  Commission
                                                   
     {
         private static final String COMPONENT_NAME = "test";

Modified: 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestGeneratorImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestGeneratorImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestGeneratorImpl.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestGeneratorImpl.java
 Mon Jul  8 08:37:45 2013
@@ -24,7 +24,7 @@ import com.sun.jini.landlord.LeaseFactor
 import com.sun.jini.landlord.LeasePeriodPolicy;
 import com.sun.jini.landlord.LeasedResource;
 import com.sun.jini.landlord.FixedLeasePeriodPolicy;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 import net.jini.config.Configuration;
 import net.jini.config.ConfigurationException;
 import net.jini.config.ConfigurationProvider;
@@ -69,7 +69,7 @@ import net.jini.core.lease.LeaseMapExcep
 import net.jini.export.ProxyAccessor;
 
 public class TestGeneratorImpl 
-    implements TestGenerator, Landlord, TimeConstants, ProxyAccessor, Starter
+    implements TestGenerator, Landlord, TimeConstants, ProxyAccessor, 
Commission
 {
 
     private static Logger logger = Logger.getLogger("com.sun.jini.qa.harness");

Modified: 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestListenerImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestListenerImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestListenerImpl.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestListenerImpl.java
 Mon Jul  8 08:37:45 2013
@@ -19,7 +19,7 @@ package com.sun.jini.test.impl.mercury;
 
 import com.sun.jini.proxy.BasicProxyTrustVerifier;
 import com.sun.jini.start.LifeCycle;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 
 import net.jini.config.Configuration;
 import net.jini.config.ConfigurationException;
@@ -53,7 +53,7 @@ import javax.security.auth.login.LoginEx
 
 
 public class TestListenerImpl
-    implements TestListener, ProxyAccessor, ServerProxyTrust, Starter
+    implements TestListener, ProxyAccessor, ServerProxyTrust, Commission
 {
     private final Map events = new HashMap();
 

Modified: 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestPullListenerImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestPullListenerImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestPullListenerImpl.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/mercury/TestPullListenerImpl.java
 Mon Jul  8 08:37:45 2013
@@ -18,7 +18,7 @@
 package com.sun.jini.test.impl.mercury;
 import com.sun.jini.proxy.BasicProxyTrustVerifier;
 import com.sun.jini.start.LifeCycle;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 
 import net.jini.config.Configuration;
 import net.jini.config.ConfigurationException;
@@ -56,7 +56,7 @@ import net.jini.event.MailboxPullRegistr
 import net.jini.event.InvalidIteratorException;
 
 public class TestPullListenerImpl 
-    implements TestPullListener, ProxyAccessor, ServerProxyTrust, Starter
+    implements TestPullListener, ProxyAccessor, ServerProxyTrust, Commission
 {
     private final Map events = new HashMap();
 

Modified: 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/start/BadServiceProxyAccessorImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/start/BadServiceProxyAccessorImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/start/BadServiceProxyAccessorImpl.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/start/BadServiceProxyAccessorImpl.java
 Mon Jul  8 08:37:45 2013
@@ -20,7 +20,7 @@ package com.sun.jini.test.impl.start;
 import com.sun.jini.proxy.BasicProxyTrustVerifier;
 import com.sun.jini.start.LifeCycle;
 import com.sun.jini.start.ServiceProxyAccessor;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 
 import net.jini.config.Configuration;
 import net.jini.config.ConfigurationException;
@@ -57,7 +57,7 @@ import javax.security.auth.login.LoginEx
 
 
 public class BadServiceProxyAccessorImpl 
-    implements BadServiceProxyAccessor, ProxyAccessor, Starter
+    implements BadServiceProxyAccessor, ProxyAccessor, Commission
 {
     private Object serverStub;
     private AccessControlContext context;

Modified: 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/start/TestServiceImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/start/TestServiceImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/start/TestServiceImpl.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/impl/start/TestServiceImpl.java
 Mon Jul  8 08:37:45 2013
@@ -26,7 +26,7 @@ import java.rmi.MarshalledObject;
 import com.sun.jini.config.Config;
 import com.sun.jini.test.impl.start.TestService;
 import com.sun.jini.start.LifeCycle;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 import net.jini.config.Configuration;
 import net.jini.config.ConfigurationException;
 import net.jini.config.ConfigurationProvider;
@@ -60,7 +60,7 @@ import javax.security.auth.login.LoginEx
 /**
  * Activatable implementation of the TestService interface.
  */
-public class TestServiceImpl implements TestService, ProxyAccessor, Starter {
+public class TestServiceImpl implements TestService, ProxyAccessor, Commission 
{
 
     private static volatile int staticInt = 0;
     

Modified: 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/services/lookupsimulator/LookupSimulatorImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/services/lookupsimulator/LookupSimulatorImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/services/lookupsimulator/LookupSimulatorImpl.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/services/lookupsimulator/LookupSimulatorImpl.java
 Mon Jul  8 08:37:45 2013
@@ -60,7 +60,7 @@ import com.sun.jini.start.LifeCycle;
 import net.jini.security.proxytrust.ServerProxyTrust;
 
 import com.sun.jini.config.Config;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 import java.security.AccessControlContext;
 import java.security.AccessController;
 import net.jini.export.Exporter;
@@ -101,7 +101,7 @@ import net.jini.jeri.tcp.TcpServerEndpoi
 public class LookupSimulatorImpl implements LookupSimulator, 
                                            ServerProxyTrust,
                                            ProxyAccessor,
-                                            Starter
+                                            Commission
 {
     private static Logger logger = 
Logger.getLogger("com.sun.jini.harness.test");
     private MethodConstraints locatorConstraints;

Modified: 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestRegistrar.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestRegistrar.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestRegistrar.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/QATestRegistrar.java
 Mon Jul  8 08:37:45 2013
@@ -83,7 +83,7 @@ public abstract class QATestRegistrar ex
      *  expired to guarantee that the next lookup is performed after
      *  service lease expiration has occurred
      */
-    public long deltaTSrvcLeaseExp = 10;
+    private long deltaTSrvcLeaseExp = 10;
 
     /** The number of milliseconds to wait after the event lease has
      *  expired to guarantee that the next event-generating operation is
@@ -831,7 +831,7 @@ public abstract class QATestRegistrar ex
      *  @return Entry object as defined in net.jini.core.entry.Entry
      *  @see net.jini.core.entry.Entry
      */
-    protected Entry createAttribute(Class classObj,
+    protected synchronized Entry createAttribute(Class classObj,
                                     int   classIndx,
                                     int   createFlag)  throws Exception
     {

Modified: 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/LeaseMapRenew.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/LeaseMapRenew.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/LeaseMapRenew.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/qa/src/com/sun/jini/test/spec/lookupservice/test_set02/LeaseMapRenew.java
 Mon Jul  8 08:37:45 2013
@@ -27,6 +27,7 @@ import java.io.IOException;
 import java.util.Date;
 import com.sun.jini.test.spec.lookupservice.QATestRegistrar;
 import com.sun.jini.test.spec.lookupservice.QATestUtils;
+import java.util.logging.Logger;
 import net.jini.core.lookup.ServiceRegistrar;
 import net.jini.core.lookup.ServiceItem;
 import net.jini.core.lookup.ServiceRegistration;
@@ -77,8 +78,8 @@ public class LeaseMapRenew extends QATes
     }
 
     /** The event handler for the services registered by this class */
-    private static RemoteEventListener listener;
-
+    private RemoteEventListener listener;
+    
     /** Performs actions necessary to prepare for execution of the 
      *  current QA test.
      *

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/fiddler/FiddlerImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/fiddler/FiddlerImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/fiddler/FiddlerImpl.java 
(original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/fiddler/FiddlerImpl.java 
Mon Jul  8 08:37:45 2013
@@ -34,7 +34,7 @@ import com.sun.jini.reliableLog.Reliable
 import com.sun.jini.reliableLog.LogHandler;
 
 import com.sun.jini.start.LifeCycle;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 
 import com.sun.jini.thread.InterruptedStatusThread;
 import com.sun.jini.thread.ReadersWriter;
@@ -166,7 +166,7 @@ import java.util.logging.Logger;
  *
  * @author Sun Microsystems, Inc.
  */
-class FiddlerImpl implements ServerProxyTrust, ProxyAccessor, Fiddler, Starter 
{
+class FiddlerImpl implements ServerProxyTrust, ProxyAccessor, Fiddler, 
Commission {
 
     /* Name of this component; used in config entry retrieval and the logger.*/
     static final String COMPONENT_NAME = "com.sun.jini.fiddler";

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mahalo/TxnManagerImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mahalo/TxnManagerImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mahalo/TxnManagerImpl.java 
(original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mahalo/TxnManagerImpl.java 
Mon Jul  8 08:37:45 2013
@@ -35,7 +35,7 @@ import com.sun.jini.mahalo.log.LogRecove
 import com.sun.jini.mahalo.log.MultiLogManager;
 import com.sun.jini.mahalo.log.MultiLogManagerAdmin;
 import com.sun.jini.start.LifeCycle;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 import com.sun.jini.thread.InterruptedStatusThread;
 import com.sun.jini.thread.ReadyState;
 import com.sun.jini.thread.TaskManager;
@@ -119,7 +119,7 @@ import net.jini.security.TrustVerifier;
 class TxnManagerImpl /*extends RemoteServer*/
     implements TxnManager, LeaseExpirationMgr.Expirer,
               LogRecovery, TxnSettler, com.sun.jini.constants.TimeConstants,
-               LocalLandlord, ServerProxyTrust, ProxyAccessor, Starter
+               LocalLandlord, ServerProxyTrust, ProxyAccessor, Commission
 {
     /** Logger for (successful) service startup message */
     static final Logger startupLogger = 

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mercury/MailboxImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mercury/MailboxImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mercury/MailboxImpl.java 
(original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/mercury/MailboxImpl.java 
Mon Jul  8 08:37:45 2013
@@ -37,7 +37,7 @@ import com.sun.jini.reliableLog.Reliable
 import com.sun.jini.reliableLog.LogException;
 import com.sun.jini.reliableLog.LogHandler;
 import com.sun.jini.start.LifeCycle;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 import com.sun.jini.thread.InterruptedStatusThread;
 import com.sun.jini.thread.ReadersWriter;
 import com.sun.jini.thread.ReadersWriter.ConcurrentLockException;
@@ -156,7 +156,7 @@ See recoverSnapshot() for exact details 
 */
 
 class MailboxImpl implements MailboxBackEnd, TimeConstants, 
-    ServerProxyTrust, ProxyAccessor, Starter
+    ServerProxyTrust, ProxyAccessor, Commission
  
 {
 

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/norm/NormServerBaseImpl.java
 Mon Jul  8 08:37:45 2013
@@ -98,7 +98,7 @@ import com.sun.jini.proxy.ThrowThis;
 import com.sun.jini.start.LifeCycle;
 import com.sun.jini.reliableLog.LogException;
 import com.sun.jini.reliableLog.LogHandler;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 import com.sun.jini.thread.InterruptedStatusThread;
 import java.security.AccessControlContext;
 import java.security.AccessController;
@@ -110,7 +110,7 @@ import java.security.AccessController;
  * @author Sun Microsystems, Inc.
  */
 abstract class NormServerBaseImpl
-    implements NormServer, LocalLandlord, ServerProxyTrust, ProxyAccessor, 
Starter
+    implements NormServer, LocalLandlord, ServerProxyTrust, ProxyAccessor, 
Commission
 {
     /** Current version of log format */
     private static final int CURRENT_LOG_VERSION = 2;

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OutriggerServerImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OutriggerServerImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OutriggerServerImpl.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OutriggerServerImpl.java
 Mon Jul  8 08:37:45 2013
@@ -31,7 +31,7 @@ import com.sun.jini.landlord.LocalLandlo
 import com.sun.jini.landlord.LeaseFactory;
 import com.sun.jini.logging.Levels;
 import com.sun.jini.start.LifeCycle;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 
 import net.jini.id.Uuid;
 import net.jini.id.UuidFactory;
@@ -151,7 +151,7 @@ import net.jini.core.transaction.server.
  */
 public class OutriggerServerImpl 
     implements OutriggerServer, TimeConstants, LocalLandlord, Recover,
-              ServerProxyTrust, Starter
+              ServerProxyTrust, Commission
 {      
     /**
      * Component name we use to find items in the configuration and loggers.

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OutriggerServerWrapper.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OutriggerServerWrapper.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OutriggerServerWrapper.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/outrigger/OutriggerServerWrapper.java
 Mon Jul  8 08:37:45 2013
@@ -47,7 +47,7 @@ import net.jini.config.ConfigurationExce
 import net.jini.id.Uuid;
 
 import com.sun.jini.start.LifeCycle;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 
 /**
  * For various reasons there is code that we would like
@@ -61,7 +61,7 @@ import com.sun.jini.start.Starter;
  * @since 2.0
  */
 class OutriggerServerWrapper 
-    implements OutriggerServer, ServerProxyTrust, ProxyAccessor, Starter
+    implements OutriggerServer, ServerProxyTrust, ProxyAccessor, Commission
 {
     /** The object being delegated to */     
     private final OutriggerServerImpl delegate;

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=1500606&r1=1500605&r2=1500606&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 
Mon Jul  8 08:37:45 2013
@@ -34,7 +34,7 @@ import com.sun.jini.proxy.MarshalledWrap
 import com.sun.jini.reliableLog.LogHandler;
 import com.sun.jini.reliableLog.ReliableLog;
 import com.sun.jini.start.LifeCycle;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 import com.sun.jini.thread.InterruptedStatusThread;
 import com.sun.jini.thread.ReadersWriter;
 import com.sun.jini.thread.ReadyState;
@@ -147,7 +147,7 @@ import net.jini.security.proxytrust.Serv
  * @author Sun Microsystems, Inc.
  *
  */
-class RegistrarImpl implements Registrar, ProxyAccessor, ServerProxyTrust, 
Starter {
+class RegistrarImpl implements Registrar, ProxyAccessor, ServerProxyTrust, 
Commission {
 
     /** Maximum minMax lease duration for both services and events */
     private static final long MAX_LEASE = 1000L * 60 * 60 * 24 * 365 * 1000;
@@ -877,7 +877,7 @@ class RegistrarImpl implements Registrar
        public void apply(RegistrarImpl regImpl) {
            try {
                regImpl.addAttributesDo(serviceID, leaseID, attrSets);
-           } catch (UnknownLeaseException e) {
+            } catch (UnknownLeaseException e) {
                /* this exception should never occur when recovering  */
                throw new AssertionError("an UnknownLeaseException should"
                                         + " never occur during recovery");
@@ -5248,11 +5248,7 @@ class RegistrarImpl implements Registrar
        throws UnknownLeaseException
     {
        long now = System.currentTimeMillis();
-       SvcReg reg = (SvcReg)serviceByID.get(serviceID);
-       if (reg == null ||
-           !reg.leaseID.equals(leaseID) ||
-           reg.leaseExpiration <= now)
-           throw new UnknownLeaseException();
+       SvcReg reg = checkLease(serviceID, leaseID, now);
        Item pre = (Item)reg.item.clone();
        EntryRep[] sets = reg.item.attributeSets;
        int i = 0;
@@ -5297,11 +5293,7 @@ class RegistrarImpl implements Registrar
                                           "attribute set type mismatch");
        }
        long now = System.currentTimeMillis();
-       SvcReg reg = (SvcReg)serviceByID.get(serviceID);
-       if (reg == null ||
-           !reg.leaseID.equals(leaseID) ||
-           reg.leaseExpiration <= now)
-           throw new UnknownLeaseException();
+       SvcReg reg = checkLease(serviceID, leaseID, now);
        Item pre = (Item)reg.item.clone();
        EntryRep[] preSets = pre.attributeSets;
        EntryRep[] sets = reg.item.attributeSets;
@@ -5348,11 +5340,7 @@ class RegistrarImpl implements Registrar
        else
            attrSets = (EntryRep[])removeDups(attrSets);
        long now = System.currentTimeMillis();
-       SvcReg reg = (SvcReg)serviceByID.get(serviceID);
-       if (reg == null ||
-           !reg.leaseID.equals(leaseID) ||
-           reg.leaseExpiration <= now)
-           throw new UnknownLeaseException();
+       SvcReg reg = checkLease(serviceID, leaseID, now);
        Item pre = (Item)reg.item.clone();
        EntryRep[] entries = reg.item.attributeSets;
        for (int i = entries.length; --i >= 0; ) {
@@ -5372,11 +5360,7 @@ class RegistrarImpl implements Registrar
        if (serviceID.equals(myServiceID))
            throw new SecurityException("privileged service id");
        long now = System.currentTimeMillis();
-       SvcReg reg = (SvcReg)serviceByID.get(serviceID);
-       if (reg == null ||
-           !reg.leaseID.equals(leaseID) ||
-           reg.leaseExpiration <= now)
-           throw new UnknownLeaseException();
+       SvcReg reg = checkLease(serviceID, leaseID, now);
        deleteService(reg, now);
        /* wake up thread if this might be the (only) earliest time */
        if (reg.leaseExpiration == minSvcExpiration)
@@ -5396,6 +5380,27 @@ class RegistrarImpl implements Registrar
                                                   renewExpiration));
        return renewExpiration - now;
     }
+    
+    private SvcReg checkLease(ServiceID serviceID, Uuid leaseID, long now) 
+            throws UnknownLeaseException
+    {
+        
+       SvcReg reg = serviceByID.get(serviceID);
+        if (reg == null) throw new UnknownLeaseException("No service recorded 
for ID: " + serviceID);
+        if (!reg.leaseID.equals(leaseID)) throw new 
UnknownLeaseException("Incorrect lease ID: " + leaseID + " not equal to reg 
lease ID: " + reg.leaseID);
+       if (reg.leaseExpiration <= now) throw new UnknownLeaseException("Lease 
expired");
+        return reg;
+    }
+    
+    private EventReg checkEvent(Uuid leaseID, long eventID, long now)
+            throws UnknownLeaseException
+    {
+        EventReg reg = (EventReg)eventByID.get(Long.valueOf(eventID));
+       if (reg == null) throw new UnknownLeaseException("No event recorded for 
ID: " + eventID);
+        if (!reg.leaseID.equals(leaseID)) throw new 
UnknownLeaseException("Incorrect lease ID: " + eventID + " not equal to reg 
lease ID: " + reg.leaseID);
+       if (reg.leaseExpiration <= now) throw new UnknownLeaseException("Lease 
expired");
+        return reg;
+    }
 
     /** Renew a service lease for a relative duration from now. */
     private long renewServiceLeaseInt(ServiceID serviceID,
@@ -5410,14 +5415,7 @@ class RegistrarImpl implements Registrar
            renewDuration = maxServiceLease;
        else if (renewDuration < 0)
            throw new IllegalArgumentException("negative lease duration");
-       SvcReg reg = serviceByID.get(serviceID);
-       if (reg == null ||
-           !reg.leaseID.equals(leaseID) ||
-           reg.leaseExpiration <= now)
-           throw new UnknownLeaseException();
-        if (reg == null) throw new UnknownLeaseException("No service recorded 
for ID: " + serviceID);
-        if (!reg.leaseID.equals(leaseID)) throw new 
UnknownLeaseException("Incorrect lease ID: " + leaseID + " not equal to reg 
lease ID: " + reg.leaseID);
-       if (reg.leaseExpiration <= now) throw new UnknownLeaseException("Lease 
expired");
+        SvcReg reg = checkLease(serviceID, leaseID, now);
        if (renewDuration > maxServiceLease &&
            renewDuration > reg.leaseExpiration - now)
            renewDuration = Math.max(reg.leaseExpiration - now,
@@ -5454,9 +5452,10 @@ class RegistrarImpl implements Registrar
        throws UnknownLeaseException
     {
        long now = System.currentTimeMillis();
-       EventReg reg = eventByID.get(Long.valueOf(eventID));
-       if (reg == null || reg.leaseExpiration <= now)
-           throw new UnknownLeaseException();
+       EventReg reg = checkEvent(leaseID, eventID, now);
+//        EventReg reg = eventByID.get(Long.valueOf(eventID));
+//     if (reg == null || reg.leaseExpiration <= now)
+//         throw new UnknownLeaseException();
        deleteEvent(reg);
        /* wake up thread if this might be the (only) earliest time */
        if (reg.leaseExpiration == minEventExpiration)
@@ -5487,10 +5486,7 @@ class RegistrarImpl implements Registrar
            renewDuration = maxEventLease;
        else if (renewDuration < 0)
            throw new IllegalArgumentException("negative lease duration");
-       EventReg reg = (EventReg)eventByID.get(Long.valueOf(eventID));
-       if (reg == null) throw new UnknownLeaseException("No event recorded for 
ID: " + eventID);
-        if (!reg.leaseID.equals(leaseID)) throw new 
UnknownLeaseException("Incorrect lease ID: " + eventID + " not equal to reg 
lease ID: " + reg.leaseID);
-       if (reg.leaseExpiration <= now) throw new UnknownLeaseException("Lease 
expired");
+       EventReg reg = checkEvent(leaseID, eventID, now);
        if (renewDuration > maxEventLease &&
            renewDuration > reg.leaseExpiration - now)
            renewDuration = Math.max(reg.leaseExpiration - now, maxEventLease);

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/ActivateWrapper.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/ActivateWrapper.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/ActivateWrapper.java 
(original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/ActivateWrapper.java 
Mon Jul  8 08:37:45 2013
@@ -18,6 +18,7 @@
 
 package com.sun.jini.start;
 
+import org.apache.river.api.util.Commission;
 import net.jini.export.ProxyAccessor;
 import net.jini.id.Uuid;
 import net.jini.id.UuidFactory;
@@ -470,15 +471,15 @@ public class ActivateWrapper implements 
                constructor.setAccessible(true);
                impl =
                    constructor.newInstance(new Object[]{id, desc.data});
-                if (impl instanceof Starter) {
-                    ((Starter) impl).start();
+                if (impl instanceof Commission) {
+                    ((Commission) impl).start();
                 } else {
                     logger.log( Level.SEVERE,
                         "Service {0} doesn''t implement {1} {2} {3} {4} {5} 
{6}", 
                         new Object []
                             {
                                 impl.getClass().getCanonicalName(),
-                                Starter.class.getCanonicalName(),
+                                Commission.class.getCanonicalName(),
                                 "this service is likely to suffer from race",
                                 "conditions caused by export performed 
during", 
                                 "construction, or threads started while 
''this''",

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/NonActivatableServiceDescriptor.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/NonActivatableServiceDescriptor.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/NonActivatableServiceDescriptor.java
 (original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/NonActivatableServiceDescriptor.java
 Mon Jul  8 08:37:45 2013
@@ -18,6 +18,7 @@
 
 package com.sun.jini.start;
 
+import org.apache.river.api.util.Commission;
 import com.sun.jini.config.Config;
 
 import net.jini.config.Configuration;
@@ -676,15 +677,15 @@ public class NonActivatableServiceDescri
                 constructor);
             constructor.setAccessible(true);
             impl = constructor.newInstance(argParms);
-            if (impl instanceof Starter) {
-                ((Starter) impl).start();
+            if (impl instanceof Commission) {
+                ((Commission) impl).start();
             } else {
                 logger.log( Level.SEVERE,
                     "Service {0} doesn''t implement {1} {2} {3} {4} {5} {6}", 
                     new Object []
                         {
                             impl.getClass().getCanonicalName(),
-                            Starter.class.getCanonicalName(),
+                            Commission.class.getCanonicalName(),
                             "this service is likely to suffer from race",
                             "conditions caused by export performed during", 
                             "construction, or threads started while ''this''",

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=1500606&r1=1500605&r2=1500606&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 
Mon Jul  8 08:37:45 2013
@@ -136,7 +136,7 @@ public class ServiceStarter {
     /** Component name for service starter configuration entries */
     static final String START_PACKAGE = "com.sun.jini.start";
     
-   
+
     /** Configure logger */
     static /*final*/ Logger logger = null;
     static {

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/SharedGroupImpl.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/SharedGroupImpl.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/SharedGroupImpl.java 
(original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/SharedGroupImpl.java 
Mon Jul  8 08:37:45 2013
@@ -18,6 +18,7 @@
 
 package com.sun.jini.start;
 
+import org.apache.river.api.util.Commission;
 import java.io.IOException;
 import java.rmi.MarshalledObject;
 import java.rmi.Remote;
@@ -191,7 +192,7 @@ import net.jini.security.proxytrust.Serv
  *
  */
 public class SharedGroupImpl implements Remote, 
-       SharedGroupBackEnd, ServerProxyTrust, ProxyAccessor, Starter {
+       SharedGroupBackEnd, ServerProxyTrust, ProxyAccessor, Commission {
     
     /** Component name for configuration entries */
     static final String START_PACKAGE = "com.sun.jini.start";

Modified: 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/tool/ClassServer.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/tool/ClassServer.java?rev=1500606&r1=1500605&r2=1500606&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/tool/ClassServer.java 
(original)
+++ river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/tool/ClassServer.java 
Mon Jul  8 08:37:45 2013
@@ -19,7 +19,7 @@ package com.sun.jini.tool;
 
 import com.sun.jini.logging.Levels;
 import com.sun.jini.start.LifeCycle;
-import com.sun.jini.start.Starter;
+import org.apache.river.api.util.Commission;
 import java.io.BufferedInputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
@@ -162,7 +162,7 @@ import java.util.logging.Logger;
  * @author Sun Microsystems, Inc.
  *
  */
-public class ClassServer extends Thread implements Starter {
+public class ClassServer extends Thread implements Commission {
     /** Default HTTP port */
     private static int DEFAULT_PORT = 8080;
     /** Default directory to serve files from on non-Windows OS */

Copied: 
river/jtsk/skunk/qa_refactor/trunk/src/org/apache/river/api/util/Commission.java
 (from r1488180, 
river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/Starter.java)
URL: 
http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/org/apache/river/api/util/Commission.java?p2=river/jtsk/skunk/qa_refactor/trunk/src/org/apache/river/api/util/Commission.java&p1=river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/Starter.java&r1=1488180&r2=1500606&rev=1500606&view=diff
==============================================================================
--- river/jtsk/skunk/qa_refactor/trunk/src/com/sun/jini/start/Starter.java 
(original)
+++ 
river/jtsk/skunk/qa_refactor/trunk/src/org/apache/river/api/util/Commission.java
 Mon Jul  8 08:37:45 2013
@@ -16,23 +16,25 @@
  * limitations under the License.
  */
 
-package com.sun.jini.start;
+package org.apache.river.api.util;
 
 /**
- * Implemented by a service to enable starting after construction.
+ * Implemented by an object to enable starting threads, perform remote
+ * export or any other activity after construction is complete, required to put
+ * the object into an operational state.
  * 
  * @see ServiceDescriptor
  * @see Exporter
  * 
  */
-public interface Starter {
+public interface Commission {
     /**
-     * Called by the ServiceStarter after construction, allows the service to
-     * delay starting threads and exporting until after construction is 
complete, 
+     * Called after construction, this method enables objects to delay
+     * starting threads or exporting until after construction is complete, 
      * to allow safe publication of the service in accordance with the JMM.
      * <p>
      * In addition to starting threads after construction, it also allows
-     * services to avoid throwing an exception during construction to avoid
+     * objects to avoid throwing an exception during construction to avoid
      * finalizer attacks.
      * <p>
      * The implementation is required to ensure start() is idempotent 


Reply via email to