river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r998727 [2/2] - in /incubator/river/jtsk/skunk/patsTaskManager: ./ examples/hello/src/com/sun/jini/example/hello/ lib/ qa/ qa/doc/ qa/src/com/sun/jini/qa/harness/ qa/src/com/sun/jini/test/impl/discoveryproviders/ src/com/sun/jini/collection...
Date Sun, 19 Sep 2010 20:47:53 GMT
Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/core/lookup/ServiceRegistrar.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/core/lookup/ServiceRegistrar.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/core/lookup/ServiceRegistrar.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/core/lookup/ServiceRegistrar.java Sun Sep 19 20:47:51 2010
@@ -19,8 +19,8 @@ package net.jini.core.lookup;
 
 import java.rmi.RemoteException;
 import java.rmi.MarshalledObject;
-import net.jini.core.event.EventRegistration;
-import net.jini.core.event.RemoteEventListener;
+import net.jini.core.event.*;
+import net.jini.core.discovery.LookupLocator;
 
 /**
  * Defines the interface to the lookup service.  The interface is not a
@@ -39,7 +39,107 @@ import net.jini.core.event.RemoteEventLi
  *
  * @since 1.0
  */
-public interface ServiceRegistrar extends PortableServiceRegistrar {
+public interface ServiceRegistrar {
+
+    /**
+     * Register a new service or re-register an existing service. The method
+     * is defined so that it can be used in an idempotent fashion.
+     * Specifically, if a call to register results in a RemoteException (in
+     * which case the item might or might not have been registered), the
+     * caller can simply repeat the call to register with the same parameters,
+     * until it succeeds.
+     * <p>
+     * To register a new service, item.serviceID should be null.  In that
+     * case, if item.service does not equal (using MarshalledObject.equals)
+     * any existing item's service object, then a new service ID will be
+     * assigned and included in the returned ServiceRegistration.  The
+     * service ID is unique over time and space with respect to all other
+     * service IDs generated by all lookup services.  If item.service does
+     * equal an existing item's service object, the existing item is first
+     * deleted from the lookup service (even if it has different attributes)
+     * and its lease is cancelled, but that item's service ID is reused for
+     * the newly registered item.
+     * <p>
+     * To re-register an existing service, or to register the service in any
+     * other lookup service, item.serviceID should be set to the same service
+     * ID that was returned by the initial registration.  If an item is
+     * already registered under the same service ID, the existing item is
+     * first deleted (even if it has different attributes or a different
+     * service instance) and its lease is cancelled.  Note that service
+     * object equality is not checked in this case, to allow for reasonable
+     * evolution of the service (e.g., the serialized form of the stub
+     * changes, or the service implements a new interface).
+     * <p>
+     * Any duplicate attribute sets included in a service item are eliminated
+     * in the stored representation of the item.  The lease duration request
+     * is not exact; the returned lease is allowed to have a shorter (but not
+     * longer) duration than what was requested.  The registration is
+     * persistent across restarts (crashes) of the lookup service until the
+     * lease expires or is cancelled.
+     *
+     * @param item service item to register
+     * @param leaseDuration requested lease duration, in milliseconds
+     * @return a ServiceRegistration in this lookup service for the specified 
+     *         service item
+     * @throws java.rmi.RemoteException
+     */
+    ServiceRegistration register(ServiceItem item, long leaseDuration)
+	throws RemoteException;
+
+    /**
+     * Returns the service object (i.e., just ServiceItem.service) from an
+     * item matching the template, or null if there is no match.  If multiple
+     * items match the template, it is arbitrary as to which service object
+     * is returned.  If the returned object cannot be deserialized, an
+     * UnmarshalException is thrown with the standard RMI semantics.
+     *
+     * @param tmpl template to match
+     * @return an object that represents a service that matches the 
+     *         specified template
+     * @throws java.rmi.RemoteException
+     */
+    Object lookup(ServiceTemplate tmpl) throws RemoteException;
+
+    /**
+     * Returns at most maxMatches items matching the template, plus the total
+     * number of items that match the template.  The return value is never
+     * null, and the returned items array is only null if maxMatches is zero.
+     * For each returned item, if the service object cannot be deserialized,
+     * the service field of the item is set to null and no exception is
+     * thrown. Similarly, if an attribute set cannot be deserialized, that
+     * element of the attributeSets array is set to null and no exception
+     * is thrown.
+     *
+     * @param tmpl template to match
+     * @param maxMatches maximum number of matches to return
+     * @return a ServiceMatches instance that contains at most maxMatches 
+     *         items matching the template, plus the total number of items
+     *         that match the template.  The return value is never null, and
+     *         the returned items array is only null if maxMatches is zero.
+     * @throws java.rmi.RemoteException
+     */
+    ServiceMatches lookup(ServiceTemplate tmpl, int maxMatches)
+	throws RemoteException;
+
+    /**
+     * An event is sent when the changed item matches the template before
+     * the operation, but doesn't match the template after the operation
+     * (this includes deletion of the item).
+     */
+    int TRANSITION_MATCH_NOMATCH = 1 << 0;
+
+    /**
+     * An event is sent when the changed item doesn't match the template
+     * before the operation (this includes not existing), but does match
+     * the template after the operation.
+     */
+    int TRANSITION_NOMATCH_MATCH = 1 << 1;
+
+    /**
+     * An event is sent when the changed item matches the template both
+     * before and after the operation.
+     */
+    int TRANSITION_MATCH_MATCH = 1 << 2;
 
     /**
      * Registers for event notification.  The registration is leased; the
@@ -69,4 +169,101 @@ public interface ServiceRegistrar extend
 			     MarshalledObject handback,
 			     long leaseDuration)
 	throws RemoteException;
+
+    /**
+     * Looks at all service items that match the specified template, finds
+     * every entry (among those service items) that either doesn't match any
+     * entry templates or is a subclass of at least one matching entry
+     * template, and returns the set of the (most specific) classes of those
+     * entries.  Duplicate classes are eliminated, and the order of classes
+     * within the returned array is arbitrary.  Null (not an empty array) is
+     * returned if there are no such entries or no matching items.  If a
+     * returned class cannot be deserialized, that element of the returned
+     * array is set to null and no exception is thrown.
+     *
+     * @param tmpl template to match
+     * @return an array of entry Classes (attribute sets) for every service 
+     *         that matches the specified template
+     * @throws java.rmi.RemoteException
+     */
+    Class[] getEntryClasses(ServiceTemplate tmpl) throws RemoteException;
+
+    /**
+     * Looks at all service items that match the specified template, finds
+     * every entry (among those service items) that matches
+     * tmpl.attributeSetTemplates[setIndex], and returns the set of values
+     * of the specified field of those entries.  Duplicate values are
+     * eliminated, and the order of values within the returned array is
+     * arbitrary.  Null (not an empty array) is returned if there are no
+     * matching items.  If a returned value cannot be deserialized, that
+     * element of the returned array is set to null and no exception is
+     * thrown.
+     *
+     * @param tmpl template to match
+     * @param setIndex index into tmpl.attributeSetTemplates
+     * @param field name of field of tmpl.attributeSetTemplates[setIndex]
+     *
+     * @return an array of objects that represents field values of entries 
+     *         associated with services that meet the specified matching 
+     *         criteria 
+     *         
+     * @throws NoSuchFieldException field does not name a field of the
+     *         entry template
+     * @throws java.rmi.RemoteException
+     */
+    Object[] getFieldValues(ServiceTemplate tmpl, int setIndex, String field)
+	throws NoSuchFieldException, RemoteException;
+
+    /**
+     * Looks at all service items that match the specified template, and for
+     * every service item finds the most specific type (class or interface)
+     * or types the service item is an instance of that are neither equal to,
+     * nor a superclass of, any of the service types in the template and that
+     * have names that start with the specified prefix, and returns the set
+     * of all such types.  Duplicate types are eliminated, and the order of
+     * types within the returned array is arbitrary.  Null (not an empty
+     * array) is returned if there are no such types.  If a returned type
+     * cannot be deserialized, that element of the returned array is set to
+     * null and no exception is thrown.
+     *
+     * @param tmpl template to match
+     * @param prefix class name prefix
+     *
+     * @return an array of Classes of all services that either match the
+     *         specified template or match the specified prefix 
+     * @throws java.rmi.RemoteException
+     */
+    Class[] getServiceTypes(ServiceTemplate tmpl, String prefix)
+	throws RemoteException;
+
+    /**
+     * Returns the service ID of the lookup service.  Note that this does not
+     * make a remote call.  A lookup service is always registered with itself
+     * under this service ID, and if a lookup service is configured to
+     * register itself with other lookup services, it will register with all
+     * of them using this same service ID.
+     *
+     * @return the service ID of the lookup service.
+     */
+    ServiceID getServiceID();
+
+    /**
+     * Returns a LookupLocator that can be used if necessary for unicast
+     * discovery of the lookup service.
+     *
+     * @return a LookupLocator that can be used for unicast discovery of
+     *         the lookup service, if necessary.
+     * @throws java.rmi.RemoteException
+     */
+    LookupLocator getLocator() throws RemoteException;
+
+    /**
+     * Returns the set of groups that this lookup service is currently a
+     * member of.
+     *
+     * @return a String array of groups that this lookup service is currently
+     *         a member of.
+     * @throws java.rmi.RemoteException
+     */
+    String[] getGroups() throws RemoteException;
 }

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/discovery/DiscoveryManagement.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/discovery/DiscoveryManagement.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/discovery/DiscoveryManagement.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/discovery/DiscoveryManagement.java Sun Sep 19 20:47:51 2010
@@ -28,10 +28,47 @@ import net.jini.core.lookup.ServiceRegis
  * or terminate the discovery process.
  *
  * @author Sun Microsystems, Inc.
- * @deprecated replaced by {@link net.jini.discovery.DiscoveryManagement2}
  */
-@Deprecated
-public interface DiscoveryManagement extends DiscoveryListenerManagement {
+public interface DiscoveryManagement {
+
+    /**
+     * Adds an instance of <code>DiscoveryListener</code> to the set of
+     * objects listening for discovery events. Once the listener is
+     * registered, it will be notified of all lookup services discovered
+     * to date, and will then be notified as new lookup services are
+     * discovered or existing lookup services are discarded.
+     * <p>
+     * If <code>null</code> is input to this method, a
+     * <code>NullPointerException</code> is thrown. If the listener
+     * input to this method duplicates (using the <code>equals</code>
+     * method) another element in the current set of listeners, no action
+     * is taken.
+     *
+     * @param listener an instance of <code>DiscoveryListener</code> 
+     *                 corresponding to the listener to add to the set of
+     *                 listeners.
+     *
+     * @throws java.lang.NullPointerException if <code>null</code> is
+     *         input to the <code>listener</code> parameter
+     *
+     * @see #removeDiscoveryListener
+     * @see net.jini.discovery.DiscoveryListener
+     */
+    public void addDiscoveryListener(DiscoveryListener listener);
+
+    /**
+     * Removes a listener from the set of objects listening for discovery
+     * events. If the listener object input to this method does not exist
+     * in the set of listeners, then this method will take no action.
+     *
+     * @param listener an instance of <code>DiscoveryListener</code>
+     *                 corresponding to the listener to remove from the set
+     *                 of listeners.
+     *
+     * @see #addDiscoveryListener
+     * @see net.jini.discovery.DiscoveryListener
+     */
+    public void removeDiscoveryListener(DiscoveryListener listener);
 
     /**
      * Returns an array of instances of <code>ServiceRegistrar</code>, each
@@ -53,16 +90,21 @@ public interface DiscoveryManagement ext
      * the parameter input to this method is <code>null</code>, or if it
      * does not match (using <code>equals</code>) any of the elements in
      * the managed set.
-     * 
-     * Changing the Parameter to PortableServiceRegistrar doesn't break client
-     * code, but it may break implementation code if that code utilises
-     * the nofify method from ServiceRegistrar
      *
-     * @param proxy the instance of <code>PortableServiceRegistrar</code> to remove
+     * @param proxy the instance of <code>ServiceRegistrar</code> to remove
      *              from the managed set of lookup services
      *
-     * @see net.jini.core.lookup.PortableServiceRegistrar
      * @see net.jini.core.lookup.ServiceRegistrar
      */
    public void discard(ServiceRegistrar proxy);
+
+    /**
+     * Ends all discovery processing being performed by the current
+     * implementation of this interface. After this method is invoked,
+     * no new lookup services will be discovered, and the effect of any
+     * new operations performed on the current implementation object are
+     * undefined. Any additional termination semantics must be defined
+     * by the implementation class itself.
+     */
+    public void terminate();
 }

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/discovery/OutgoingUnicastResponse.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/discovery/OutgoingUnicastResponse.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/discovery/OutgoingUnicastResponse.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/discovery/OutgoingUnicastResponse.java Sun Sep 19 20:47:51 2010
@@ -21,10 +21,7 @@ import java.io.ObjectOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.rmi.MarshalledObject;
-import net.jini.core.lookup.PortableServiceRegistrar;
 import net.jini.core.lookup.ServiceRegistrar;
-import net.jini.io.MarshalledInstance;
-import net.jini.io.MiToMoOutputStream;
 
 /**
  * Encapsulate the details of marshaling a unicast response.
@@ -42,22 +39,6 @@ public class OutgoingUnicastResponse {
     /**
      * Marshal a unicast response to the given output stream.  The
      * stream is flushed afterwards.
-     * 
-     * Older Versions of Apache River prior to 2.2.0 participating in a djinn,
-     * will not have the ability to wrap a PortableServiceRegistrar, so it
-     * can participate as a ServiceRegistrar instance. 
-     * However it is intended that the Registrar's
-     * proxy's implementation will be able to be unmarshalled
-     * with a suitable codebase that also implements ServiceRegistrar for
-     * recipients IncomingUnicastRequest's
-     * 
-     * At some future point in time, a djinn will have a minimum Apache River
-     * version requirement for participation, at that stage old application
-     * code will rely upon the PortableServiceRegistrarWrapper and ServiceRegistrar
-     * will no longer be implemented directly by the proxy class.
-     * 
-     * At the same point in time the serialized form of the PortableServiceRegistrar
-     * will be that of MarshalledInstance, not MarshalledObject as it currently is.
      *
      * @param str the stream to marshal to
      * @param reg the registrar object to marshal
@@ -66,17 +47,16 @@ public class OutgoingUnicastResponse {
      * @exception IOException a problem occurred during marshaling
      */
     public static void marshal(OutputStream str,
-			       PortableServiceRegistrar reg,
+			       ServiceRegistrar reg,
 			       String[] groups)
 	throws IOException
     {
-	ObjectOutputStream ostr = new MiToMoOutputStream(str);
-	ostr.writeObject(new MarshalledInstance(reg));
+	ObjectOutputStream ostr = new ObjectOutputStream(str);
+	ostr.writeObject(new MarshalledObject(reg));
 	ostr.writeInt(groups.length);
 	for (int i = 0; i < groups.length; i++) {
 	    ostr.writeUTF(groups[i]);
 	}
 	ostr.flush();
     }
-    
 }

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalInputStream.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalInputStream.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalInputStream.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalInputStream.java Sun Sep 19 20:47:51 2010
@@ -23,18 +23,19 @@ import java.io.InputStream;
 import java.io.InvalidObjectException;
 import java.io.ObjectInputStream;
 import java.io.ObjectStreamClass;
+import java.net.MalformedURLException;
+import java.rmi.server.RMIClassLoader;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 import net.jini.loader.ClassLoading;
-import net.jini.loader.CodebaseAccessClassLoader;
 import net.jini.security.Security;
 
 /**
  * An extension of <code>ObjectInputStream</code> that implements the
  * dynamic class loading semantics of Java(TM) Remote Method
  * Invocation (Java RMI) argument and result
- * unmarshalling (using {@link CodebaseAccessClassLoader}).  A
+ * unmarshalling (using {@link RMIClassLoader}).  A
  * <code>MarshalInputStream</code> is intended to read data written by
  * a corresponding {@link MarshalOutputStream}.
  *
@@ -45,10 +46,10 @@ import net.jini.security.Security;
  * class descriptors in the stream using {@link ClassLoading#loadClass
  * ClassLoading.loadClass} and {@link ClassLoading#loadProxyClass
  * ClassLoading.loadProxyClass} (which, in turn, use {@link
- * CodebaseAccessClassLoader#loadClass(String,String,ClassLoader)
- * CodebaseAccessClassLoader.loadClass} and {@link
- * CodebaseAccessClassLoader#loadProxyClass(String,String[],ClassLoader)
- * CodebaseAccessClassLoader.loadProxyClass}), optionally with codebase
+ * RMIClassLoader#loadClass(String,String,ClassLoader)
+ * RMIClassLoader.loadClass} and {@link
+ * RMIClassLoader#loadProxyClass(String,String[],ClassLoader)
+ * RMIClassLoader.loadProxyClass}), optionally with codebase
  * annotation strings written by a <code>MarshalOutputStream</code>.
  *
  * <p>By default, a <code>MarshalInputStream</code> ignores all

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalOutputStream.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalOutputStream.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalOutputStream.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalOutputStream.java Sun Sep 19 20:47:51 2010
@@ -21,14 +21,14 @@ package net.jini.io;
 import java.io.IOException;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
+import java.rmi.server.RMIClassLoader;
 import java.util.Collection;
-import net.jini.loader.CodebaseAccessClassLoader;
 
 /**
  * An extension of <code>ObjectOutputStream</code> that implements the
  * dynamic class loading semantics of Java(TM) Remote Method Invocation
  * (Java RMI) argument and result
- * marshalling (using {@link CodebaseAccessClassLoader}).  A
+ * marshalling (using {@link RMIClassLoader}).  A
  * <code>MarshalOutputStream</code> writes data that is intended to be
  * written by a corresponding {@link MarshalInputStream}.
  *
@@ -37,8 +37,8 @@ import net.jini.loader.CodebaseAccessCla
  * ObjectOutputStream#annotateClass annotateClass} and {@link
  * ObjectOutputStream#annotateProxyClass annotateProxyClass} to
  * annotate class descriptors in the stream with codebase strings
- * obtained using {@link CodebaseAccessClassLoader#getClassAnnotation
- * CodebaseAccessClassLoader.getClassAnnotation}.
+ * obtained using {@link RMIClassLoader#getClassAnnotation
+ * RMIClassLoader.getClassAnnotation}.
  *
  * <p><code>MarshalOutputStream</code> writes class annotations to its
  * own stream; a subclass may override the {@link #writeAnnotation
@@ -111,8 +111,8 @@ public class MarshalOutputStream
      * <p><code>MarshalOutputStream</code> implements this method as
      * follows:
      *
-     * <p>This method invokes {@link CodebaseAccessClassLoader#getClassAnnotation
-     * CodebaseAccessClassLoader.getClassAnnotation} with <code>cl</code> to get
+     * <p>This method invokes {@link RMIClassLoader#getClassAnnotation
+     * RMIClassLoader.getClassAnnotation} with <code>cl</code> to get
      * the appropriate class annotation string value (possibly
      * <code>null</code>), and then it invokes this stream's {@link
      * #writeAnnotation writeAnnotation} method with that string to
@@ -127,7 +127,7 @@ public class MarshalOutputStream
      * <code>null</code>
      **/
     protected void annotateClass(Class cl) throws IOException {
-	writeAnnotation(CodebaseAccessClassLoader.getClassAnnotation(cl));
+	writeAnnotation(RMIClassLoader.getClassAnnotation(cl));
     }
 
     /**
@@ -137,8 +137,8 @@ public class MarshalOutputStream
      * <p><code>MarshalOutputStream</code> implements this method as
      * follows:
      *
-     * <p>This method invokes {@link CodebaseAccessClassLoader#getClassAnnotation
-     * CodebaseAccessClassLoader.getClassAnnotation} with <code>cl</code> to get
+     * <p>This method invokes {@link RMIClassLoader#getClassAnnotation
+     * RMIClassLoader.getClassAnnotation} with <code>cl</code> to get
      * the appropriate class annotation string value (possibly
      * <code>null</code>), and then it invokes this stream's {@link
      * #writeAnnotation writeAnnotation} method with that string to
@@ -153,7 +153,7 @@ public class MarshalOutputStream
      * <code>null</code>
      **/
     protected void annotateProxyClass(Class cl) throws IOException {
-	writeAnnotation(CodebaseAccessClassLoader.getClassAnnotation(cl));
+	writeAnnotation(RMIClassLoader.getClassAnnotation(cl));
     }
 
     /**

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalledObject.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalledObject.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalledObject.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/io/MarshalledObject.java Sun Sep 19 20:47:51 2010
@@ -21,10 +21,10 @@ package net.jini.io;
 import java.io.Serializable;
 
 /**
- * This is a package private class used to convert <code>java.rmi.MarshalledObject</code>
+ * This is a private class used to convert <code>java.rmi.MarshalledObject</code>
  * to <code>MarshalledInstance</code> and vice versa.
  */
-final class MarshalledObject<T> implements Serializable {
+final class MarshalledObject implements Serializable {
 
     // Duplicate (private) MarshalledObject fields, and make them
     // package visable

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseRenewalService.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseRenewalService.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseRenewalService.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseRenewalService.java Sun Sep 19 20:47:51 2010
@@ -32,9 +32,8 @@ import java.rmi.RemoteException;
  * 
  * @author Sun Microsystems, Inc.
  * @see LeaseRenewalSet 
- * @deprecated.
  */
-@Deprecated
+
 public interface LeaseRenewalService {
     /**
      * Create a new <code>LeaseRenewalSet</code> that the client can

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseRenewalSet.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseRenewalSet.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseRenewalSet.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseRenewalSet.java Sun Sep 19 20:47:51 2010
@@ -168,9 +168,7 @@ import net.jini.core.lease.Lease;
  * 
  * @author Sun Microsystems, Inc.
  * @see LeaseRenewalService
- * @deprecated no replacement.
  */
-@Deprecated
 public interface LeaseRenewalSet {
     /**
      * The event id for all <code>RenewalFailureEvent</code> objects.

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseUnmarshalException.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseUnmarshalException.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseUnmarshalException.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/lease/LeaseUnmarshalException.java Sun Sep 19 20:47:51 2010
@@ -67,10 +67,7 @@ import net.jini.core.lease.Lease;
  * 
  * @author Sun Microsystems, Inc.
  * @see Lease 
- * @deprecated not replaced, only used by {@link LeaseRenewalSet} which is also 
- * deprecated.
  */
-@Deprecated
 public class LeaseUnmarshalException extends Exception {
     private static final long serialVersionUID = -6736107321698417489L;
 

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/ClassAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/ClassAnnotation.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/ClassAnnotation.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/ClassAnnotation.java Sun Sep 19 20:47:51 2010
@@ -18,6 +18,7 @@
 
 package net.jini.loader;
 
+import java.rmi.server.RMIClassLoader;
 import net.jini.loader.pref.PreferredClassProvider;
 
 /**
@@ -25,19 +26,19 @@ import net.jini.loader.pref.PreferredCla
  * loader that is an instance of this interface.
  *
  * <p>This interface allows a {@link ClassLoader} subclass to
- * customize the behavior of {@link CodebaseAccessClassLoader#getClassAnnotation
- * CodebaseAccessClassLoader.getClassAnnotation} (and thus RMI marshalling
+ * customize the behavior of {@link RMIClassLoader#getClassAnnotation
+ * RMIClassLoader.getClassAnnotation} (and thus RMI marshalling
  * semantics) for classes defined by its instances.
  *
  * <p>Note that this interface is only effective if the current {@link
- * CodebaseAccessClassLoader} provider supports it; not all
- * <code>CodebaseAccessClassLoader</code> providers support this interface.  In
+ * RMIClassLoader} provider supports it; not all
+ * <code>RMIClassLoader</code> providers support this interface.  In
  * particular, the default provider (see {@link
- * CodebaseAccessClassLoader#getDefaultProviderInstance
- * CodebaseAccessClassLoader.getDefaultProviderInstance}) does <i>not</i> support
+ * RMIClassLoader#getDefaultProviderInstance
+ * RMIClassLoader.getDefaultProviderInstance}) does <i>not</i> support
  * this interface, and so when the default provider is used, this
  * interface will be ignored by
- * <code>CodebaseAccessClassLoader.getClassAnnotation</code>.  {@link
+ * <code>RMIClassLoader.getClassAnnotation</code>.  {@link
  * PreferredClassProvider} and its subclasses do support this
  * interface.
  *

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/DownloadPermission.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/DownloadPermission.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/DownloadPermission.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/DownloadPermission.java Sun Sep 19 20:47:51 2010
@@ -18,35 +18,39 @@
 
 package net.jini.loader;
 
+import java.rmi.server.RMIClassLoader;
 import java.security.BasicPermission;
+import java.security.CodeSource;
+import net.jini.loader.pref.PreferredClassProvider;
+import net.jini.loader.pref.RequireDlPermProvider;
 
 /**
  * Permission that must be granted to the {@link CodeSource} of a
  * downloaded class in order for the class to be defined using {@link
- * CodebaseAccessClassLoader}.
+ * RMIClassLoader}.
  *
  * <p>A <code>DownloadPermission</code> contains a name (also referred
  * to as a "target name") but no action list; you either have the
  * named permission or you don't.  The only defined target name is
  * "permit", which allows a downloaded class with a
  * <code>CodeSource</code> that is granted the permission to be
- * defined by a class loader created by <code>CodebaseAccessClassLoader</code>.
+ * defined by a class loader created by <code>RMIClassLoader</code>.
  *
  * <p>Selective granting of this permission can be used to restrict
  * the <code>CodeSource</code> values (codebase URLs and signers) from
  * which downloaded classes can be defined using
- * <code>CodebaseAccessClassLoader</code>.
+ * <code>RMIClassLoader</code>.
  *
  * <p>Note that this permission is only enforced if the current {@link
- * CodebaseAccessClassLoader} provider supports it; not all
- * <code>CodebaseAccessClassLoader</code> providers support this permission.  In
+ * RMIClassLoader} provider supports it; not all
+ * <code>RMIClassLoader</code> providers support this permission.  In
  * particular, the default provider (see {@link
- * CodebaseAccessClassLoader#getDefaultProviderInstance
- * CodebaseAccessClassLoader.getDefaultProviderInstance}) does <i>not</i> support
+ * RMIClassLoader#getDefaultProviderInstance
+ * RMIClassLoader.getDefaultProviderInstance}) does <i>not</i> support
  * this permission, and so when the default provider is used,
  * downloaded classes do not need to be granted
  * <code>DownloadPermission</code> in order to be defined using
- * <code>CodebaseAccessClassLoader</code>.  {@link PreferredClassProvider} itself
+ * <code>RMIClassLoader</code>.  {@link PreferredClassProvider} itself
  * does not enforce this permission, but subclasses may configure it
  * to do so (see {@link RequireDlPermProvider}).
  *

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/pref/PreferredClassProvider.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/pref/PreferredClassProvider.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/pref/PreferredClassProvider.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/pref/PreferredClassProvider.java Sun Sep 19 20:47:51 2010
@@ -32,6 +32,7 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
 import java.net.URLClassLoader;
+import java.rmi.server.RMIClassLoader;
 import java.rmi.server.RMIClassLoaderSpi;
 import java.security.AccessController;
 import java.security.CodeSource;
@@ -48,20 +49,19 @@ import java.util.WeakHashMap;
 import java.util.logging.Logger;
 import java.util.logging.Level;
 import net.jini.loader.ClassAnnotation;
-import net.jini.loader.CodebaseAccessClassLoader;
 import net.jini.loader.DownloadPermission;
 
 /**
- * An <code>CodebaseAccessClassLoader</code> provider that supports preferred
+ * An <code>RMIClassLoader</code> provider that supports preferred
  * classes.
  *
- * <p>See the {@link CodebaseAccessClassLoader} specification for information
- * about how to install and configure the <code>CodebaseAccessClassLoader</code>
+ * <p>See the {@link RMIClassLoader} specification for information
+ * about how to install and configure the <code>RMIClassLoader</code>
  * service provider.
  *
  * <p><code>PreferredClassProvider</code> uses instances of {@link
  * PreferredClassLoader} to load classes from codebase URL paths
- * supplied to <code>CodebaseAccessClassLoader.loadClass</code> methods.
+ * supplied to <code>RMIClassLoader.loadClass</code> methods.
  *
  * <p><code>PreferredClassProvider</code> does not enforce {@link
  * DownloadPermission} by default, but a subclass can configure it to
@@ -79,7 +79,7 @@ import net.jini.loader.DownloadPermissio
  *
  * The following section defines terms and describes behaviors common
  * to how <code>PreferredClassProvider</code> implements the abstract
- * methods of <code>CodebaseAccessClassLoaderSpi</code>.  Where applicable, these
+ * methods of <code>RMIClassLoaderSpi</code>.  Where applicable, these
  * definitions and descriptions are relative to the instance of
  * <code>PreferredClassProvider</code> on which a method is invoked
  * and the context in which it is invoked.
@@ -282,10 +282,10 @@ public class PreferredClassProvider exte
     /**
      * Creates a new <code>PreferredClassProvider</code>.
      *
-     * <p>This constructor is used by the {@link CodebaseAccessClassLoader}
+     * <p>This constructor is used by the {@link RMIClassLoader}
      * service provider location mechanism when
      * <code>PreferredClassProvider</code> is configured as the
-     * <code>CodebaseAccessClassLoader</code> provider class.
+     * <code>RMIClassLoader</code> provider class.
      *
      * <p>If there is a security manager, its {@link
      * SecurityManager#checkCreateClassLoader checkCreateClassLoader}
@@ -387,7 +387,7 @@ public class PreferredClassProvider exte
 
     /**
      * Provides the implementation for {@link
-     * CodebaseAccessClassLoaderSpi#loadClass(String,String,ClassLoader)}.
+     * RMIClassLoaderSpi#loadClass(String,String,ClassLoader)}.
      *
      * <p><code>PreferredClassProvider</code> implements this method
      * as follows:
@@ -684,7 +684,7 @@ public class PreferredClassProvider exte
 
     /**
      * Provides the implementation for {@link
-     * CodebaseAccessClassLoaderSpi#getClassAnnotation(Class)}.
+     * RMIClassLoaderSpi#getClassAnnotation(Class)}.
      *
      * <p><code>PreferredClassProvider</code> implements this method
      * as follows:
@@ -1416,14 +1416,23 @@ public class PreferredClassProvider exte
     }
 
     /** map from weak(key=string) to [URL[], soft(key)] */
-    private final static Map pathToURLsCache = new WeakHashMap(5);
+    private static Map pathToURLsCache = new WeakHashMap(5);
 
     /**
      * Return the class loader to be used as the parent for an RMI class
      * loader used in the current execution context.
      */
     private static ClassLoader getRMIContextClassLoader() {
-		return CodebaseAccessClassLoader.getParentContextClassLoader();
+	/*
+	 * The current implementation simply uses the current thread's
+	 * context class loader.
+	 */
+	return (ClassLoader) AccessController.doPrivileged(
+	    new PrivilegedAction() {
+		public Object run() {
+		    return Thread.currentThread().getContextClassLoader();
+		}
+	    });
     }
 
     /**
@@ -1657,15 +1666,13 @@ public class PreferredClassProvider exte
 					    final boolean requireDlPerm)
     {
 	checkInitialized();
-	return CodebaseAccessClassLoader.createClassLoader( urls, parent, requireDlPerm,
-			PreferredClassLoader.getLoaderAccessControlContext(urls) );
-//	return (ClassLoader)
-//	    AccessController.doPrivileged(new PrivilegedAction() {
-//		public Object run() {
-//		    return new PreferredClassLoader(urls, parent, null,
-//						    requireDlPerm);
-//		}
-//	    }, PreferredClassLoader.getLoaderAccessControlContext(urls));
+	return (ClassLoader)
+	    AccessController.doPrivileged(new PrivilegedAction() {
+		public Object run() {
+		    return new PreferredClassLoader(urls, parent, null,
+						    requireDlPerm);
+		}
+	    }, PreferredClassLoader.getLoaderAccessControlContext(urls));
     }
 
     /**
@@ -1690,7 +1697,7 @@ public class PreferredClassProvider exte
 	    }
 	    hashValue = h;
 	}
-        
+
 	public int hashCode() {
 	    return hashValue;
 	}

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/pref/RequireDlPermProvider.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/pref/RequireDlPermProvider.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/pref/RequireDlPermProvider.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/loader/pref/RequireDlPermProvider.java Sun Sep 19 20:47:51 2010
@@ -18,15 +18,15 @@
 
 package net.jini.loader.pref;
 
-import net.jini.loader.CodebaseAccessClassLoader;
+import java.rmi.server.RMIClassLoader;
 import net.jini.loader.DownloadPermission;
 
 /**
- * An <code>CodebaseAccessClassLoader</code> provider that supports preferred
+ * An <code>RMIClassLoader</code> provider that supports preferred
  * classes and enforces {@link DownloadPermission}.
  *
- * <p>See the {@link CodebaseAccessClassLoader} specification for information
- * about how to install and configure the <code>CodebaseAccessClassLoader</code>
+ * <p>See the {@link RMIClassLoader} specification for information
+ * about how to install and configure the <code>RMIClassLoader</code>
  * service provider.
  *
  * @author Sun Microsystems, Inc.
@@ -37,10 +37,10 @@ public class RequireDlPermProvider exten
     /**
      * Creates a new <code>RequireDlPermProvider</code>.
      *
-     * <p>This constructor is used by the {@link CodebaseAccessClassLoader}
+     * <p>This constructor is used by the {@link RMIClassLoader}
      * service provider location mechanism when
      * <code>RequireDlPermProvider</code> is configured as the
-     * <code>CodebaseAccessClassLoader</code> provider class.
+     * <code>RMIClassLoader</code> provider class.
      *
      * <p>This constructor passes <code>true</code> to the superclass
      * constructor that has a <code>boolean</code> parameter.

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/Security.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/Security.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/Security.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/Security.java Sun Sep 19 20:47:51 2010
@@ -26,7 +26,6 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.rmi.RemoteException;
 import java.security.AccessControlContext;
-import java.security.AccessControlException;
 import java.security.AccessController;
 import java.security.DomainCombiner;
 import java.security.Permission;
@@ -51,8 +50,6 @@ import javax.security.auth.Subject;
 import javax.security.auth.SubjectDomainCombiner;
 import net.jini.security.policy.DynamicPolicy;
 import net.jini.security.policy.SecurityContextSource;
-import org.apache.river.api.security.ExecutionContextManager;
-import org.apache.river.api.security.RevokeableDynamicPolicy;
 
 /**
  * Provides methods for executing actions with privileges enabled, for
@@ -169,11 +166,7 @@ public final class Security {
 	AccessController.doPrivileged(new PrivilegedAction() {
 	    public Object run() { return new ClassContextAccess(); }
 	});
-    /**
-     * ExecutionContextManager 
-     * null unless found, never returned.
-     */
-     private static volatile ExecutionContextManager ecm = null;
+
     /**
      * Non-instantiable.
      */
@@ -557,67 +550,6 @@ public final class Security {
     }
     
     /**
-     * <p>
-     * An optimised permission check, using the following strategies to
-     * reduce the cost of checking Permission:
-     * </p>
-     * <OL>
-     * <LI>Multiple permission checks may be performed together, the current
-     * execution AccessControlContext is only obtained once per invocation
-     * of this method, since identified as an expensive native code call. 
-     * The returned AccessControlContext is used for all Permission checks.
-     * <LI>The result from an AccessControlContext.checkPermission(Permission)
-     * call is cached for that AccessControlContext, so checkPermission will 
-     * only be called once, if it succeeds. If a RevokeableDynamicPolicy 
-     * is installed, checkPermission may be called again, on a following
-     * invocation if a Permission revocation has cleared it's result from the cache.
-     * <LI>Permission's are only stored in the cache based on equality, implies
-     * is not called in the cache.  This doesn't widen the scope of the cache
-     * since the tradeoff is that some implies calls are expensive.
-     * <LI>The cache used is backed by a SoftReference based ConcurrentHashMap
-     * </OL>
-     * <p>
-     * This is designed to be used in combination with Permission checks
-     * for Permission's that are Revokeable, but may also be used for optimising other
-     * non revokeable Permission checks.  A non revokeable Permission is a 
-     * Permission that guards a reference or prevents object creation, but
-     * does not prevent use of a privelege or object, if it reference escapes.
-     * see the RevokeableDynamicPolicy for details.
-     * </p><p>
-     * By lessening the cost of Permission calls it is intended that the performance
-     * impact of security checking be reduced sufficiently to provide a 
-     * wider scope for revokeable Permissions.
-     * </p><p>
-     * If a RevokeableDynamicPolicy is not installed, this method will call
-     * AccessController.checkPermission, without any optimisations.
-     * </p>
-     * @param permissions
-     * @throws java.lang.NullPointerException
-     * @throws java.security.AccessControlException
-     * @see RevokeableDynamicPolicy
-     * @see ExecutionContextManager
-     * @see AccessController
-     * @see AccessControlContext
-     */
-    public static void checkPermission(Collection<Permission> permissions)
-	    throws NullPointerException, AccessControlException
-    {
-	if (ecm == null){
-	    Policy policy = getPolicy();
-	    if (!(policy instanceof RevokeableDynamicPolicy)) {
-		Iterator<Permission> perms = permissions.iterator();
-		while (perms.hasNext()){
-		    Permission perm = perms.next();
-		    AccessController.checkPermission(perm);
-		}
-		return;
-	    }
-	    ecm = ((RevokeableDynamicPolicy) policy).getExecutionContextManager();
-	}
-	ecm.checkPermission(permissions);
-    }
-    
-    /**
      * Creates privileged context that contains the protection domain of the
      * given caller class (if non-null) and uses the domain combiner of the
      * specified context.  This method assumes it is called from within a

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/policy/PolicyFileProvider.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/policy/PolicyFileProvider.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/policy/PolicyFileProvider.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/policy/PolicyFileProvider.java Sun Sep 19 20:47:51 2010
@@ -104,14 +104,8 @@ public class PolicyFileProvider extends 
      */
     public PolicyFileProvider() throws PolicyInitializationException {
 	policyFile = null;
-        String cname = Security.getProperty(basePolicyClassProperty);
-//        @SuppressWarnings("unchecked")
-//	String cname = (String) AccessController.doPrivileged(
-//                new PrivilegedAction() {
-//            public Object run() {
-//                return System.getProperty(basePolicyClassProperty);
-//            }
-//        });
+
+	String cname = Security.getProperty(basePolicyClassProperty);
 	if (cname == null) {
 	    cname = defaultBasePolicyClass;
 	}

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/proxytrust/BasicUntrustedObjectSecurityContext.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/proxytrust/BasicUntrustedObjectSecurityContext.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/proxytrust/BasicUntrustedObjectSecurityContext.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/proxytrust/BasicUntrustedObjectSecurityContext.java Sun Sep 19 20:47:51 2010
@@ -62,15 +62,6 @@ public final class BasicUntrustedObjectS
      * neither modified nor retained; subsequent changes to that argument
      * have no effect on the instance created.
      *
-     * If additional permissions are passed in these will be added to a new 
-     * ProtectionDomain and set readonly, additional Permission's may be
-     * granted by a Policy, however any permissions granted at construction
-     * time will always be valid and cannot be revoked.
-     * 
-     * If permissions is null or empty then all BasicUntrustedObjectSecurityContext
-     * instances will share the same ProtectionDomain with all other instances
-     * without additional permissions.
-     *
      * @param permissions additional permissions to allow, or
      * <code>null</code> if no additional permissions should be allowed
      * @throws NullPointerException if any element of the argument is

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/proxytrust/ProxyTrustVerifier.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/proxytrust/ProxyTrustVerifier.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/proxytrust/ProxyTrustVerifier.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/security/proxytrust/ProxyTrustVerifier.java Sun Sep 19 20:47:51 2010
@@ -31,6 +31,8 @@ import java.lang.reflect.Proxy;
 import java.net.MalformedURLException;
 import java.rmi.RemoteException;
 import java.rmi.UnmarshalException;
+import java.rmi.server.RMIClassLoader;
+import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.security.PrivilegedActionException;
@@ -44,9 +46,6 @@ import net.jini.core.constraint.MethodCo
 import net.jini.core.constraint.RemoteMethodControl;
 import net.jini.io.MarshalInputStream;
 import net.jini.io.ObjectStreamContext;
-// For Java CDC
-//import net.jini.io.UnmarshalException;
-import net.jini.loader.CodebaseAccessClassLoader;
 import net.jini.security.SecurityContext;
 import net.jini.security.TrustVerifier;
 
@@ -229,8 +228,8 @@ public class ProxyTrustVerifier implemen
      * method; the class loader of the proxy's class is
      * the proper Java(TM) RMI class
      * loader (as defined below) for its parent class loader and the class's
-     * codebase (as produced by {@link CodebaseAccessClassLoader#getClassAnnotation
-     * CodebaseAccessClassLoader.getClassAnnotation}); and both <code>ProxyTrust</code>
+     * codebase (as produced by {@link RMIClassLoader#getClassAnnotation
+     * RMIClassLoader.getClassAnnotation}); and both <code>ProxyTrust</code>
      * and <code>RemoteMethodControl</code> are loadable by the parent class
      * loader. The derivative that is produced is an instance of a dynamically
      * generated <code>Proxy</code> class defined by the parent class loader
@@ -271,7 +270,7 @@ public class ProxyTrustVerifier implemen
      * parent class loader and the class's codebase if the class loader is
      * not <code>null</code>, the codebase for the class is a non-empty
      * string, and calling
-     * {@link CodebaseAccessClassLoader#getClassLoader CodebaseAccessClassLoader.getClassLoader}
+     * {@link RMIClassLoader#getClassLoader RMIClassLoader.getClassLoader}
      * with that codebase, with the thread's context class loader set to the
      * parent class loader, returns the class loader of the class.
      *
@@ -414,7 +413,7 @@ public class ProxyTrustVerifier implemen
 			    throws IllegalAccessException,
 				   InvocationTargetException
 			{
-			    return m.invoke(obj, (Object[])null);
+			    return m.invoke(obj, null);
 			}
 		    }), rsc.getAccessControlContext());
 	} catch (PrivilegedActionException pae) {
@@ -514,7 +513,7 @@ public class ProxyTrustVerifier implemen
 	    return null;
 	}
 	final Class base = obj.getClass();
-	final String bcb = CodebaseAccessClassLoader.getClassAnnotation(base);
+	final String bcb = RMIClassLoader.getClassAnnotation(base);
 	if (bcb == null || bcb.length() == 0) {
 	    return null;
 	}
@@ -531,9 +530,8 @@ public class ProxyTrustVerifier implemen
 		    boolean proper = false;
 		    try {
 			t.setContextClassLoader(pcl);
-			proper = (CodebaseAccessClassLoader.getClassLoader(bcb) == bcl);
-		    } catch (IOException e) {
-				logger.log(Level.FINER, e.toString()+": Can't get ClassLoader for "+bcb, e);
+			proper = (RMIClassLoader.getClassLoader(bcb) == bcl);
+		    } catch (MalformedURLException e) {
 		    } finally {
 			t.setContextClassLoader(ccl);
 		    }
@@ -545,7 +543,6 @@ public class ProxyTrustVerifier implemen
 						    RemoteMethodControl.class},
 					ih);
 			} catch (IllegalArgumentException e) {
-				logger.log(Level.FINER, e.toString(), e);
 			}
 		    }
 		    return null;
@@ -634,7 +631,7 @@ public class ProxyTrustVerifier implemen
 	}
 
 	private void writeAnnotation(final Class c) throws IOException {
-	    String cb = CodebaseAccessClassLoader.getClassAnnotation(c);
+	    String cb = RMIClassLoader.getClassAnnotation(c);
 	    writeObject(cb);
 	    if (bcb.equals(cb)) {
 		AccessController.doPrivileged(new PrivilegedAction() {

Modified: incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/space/JavaSpace05.java
URL: http://svn.apache.org/viewvc/incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/space/JavaSpace05.java?rev=998727&r1=998726&r2=998727&view=diff
==============================================================================
--- incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/space/JavaSpace05.java (original)
+++ incubator/river/jtsk/skunk/patsTaskManager/src/net/jini/space/JavaSpace05.java Sun Sep 19 20:47:51 2010
@@ -18,12 +18,17 @@
 package net.jini.space;
 
 import java.rmi.MarshalledObject;
+import java.rmi.MarshalException;
 import java.rmi.RemoteException;
 import java.util.Collection;
 import java.util.List;
 
+import net.jini.core.entry.Entry;
+import net.jini.core.entry.UnusableEntryException;
 import net.jini.core.event.EventRegistration;
+import net.jini.core.event.RemoteEvent;
 import net.jini.core.event.RemoteEventListener;
+import net.jini.core.lease.Lease;
 import net.jini.core.transaction.Transaction;
 import net.jini.core.transaction.TransactionException;
 import net.jini.entry.UnusableEntriesException;



Mime
View raw message