jdk/src/java.rmi/share/classes/sun/rmi/transport/DGCClient.java
changeset 45984 75fef64e21fa
parent 36856 81c718cdeb09
equal deleted inserted replaced
45983:4bcee8b28e89 45984:75fef64e21fa
    22  * or visit www.oracle.com if you need additional information or have any
    22  * or visit www.oracle.com if you need additional information or have any
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 package sun.rmi.transport;
    25 package sun.rmi.transport;
    26 
    26 
       
    27 import java.io.InvalidClassException;
    27 import java.lang.ref.PhantomReference;
    28 import java.lang.ref.PhantomReference;
    28 import java.lang.ref.ReferenceQueue;
    29 import java.lang.ref.ReferenceQueue;
    29 import java.net.SocketPermission;
    30 import java.net.SocketPermission;
       
    31 import java.rmi.UnmarshalException;
    30 import java.security.AccessController;
    32 import java.security.AccessController;
    31 import java.security.PrivilegedAction;
    33 import java.security.PrivilegedAction;
    32 import java.util.HashMap;
    34 import java.util.HashMap;
    33 import java.util.HashSet;
    35 import java.util.HashSet;
    34 import java.util.Iterator;
    36 import java.util.Iterator;
    39 import java.rmi.RemoteException;
    41 import java.rmi.RemoteException;
    40 import java.rmi.dgc.DGC;
    42 import java.rmi.dgc.DGC;
    41 import java.rmi.dgc.Lease;
    43 import java.rmi.dgc.Lease;
    42 import java.rmi.dgc.VMID;
    44 import java.rmi.dgc.VMID;
    43 import java.rmi.server.ObjID;
    45 import java.rmi.server.ObjID;
       
    46 
       
    47 import sun.rmi.runtime.Log;
    44 import sun.rmi.runtime.NewThreadAction;
    48 import sun.rmi.runtime.NewThreadAction;
    45 import sun.rmi.server.UnicastRef;
    49 import sun.rmi.server.UnicastRef;
    46 import sun.rmi.server.Util;
    50 import sun.rmi.server.Util;
    47 
    51 
    48 import java.security.AccessControlContext;
    52 import java.security.AccessControlContext;
   386                 long endTime = System.currentTimeMillis();
   390                 long endTime = System.currentTimeMillis();
   387 
   391 
   388                 synchronized (this) {
   392                 synchronized (this) {
   389                     dirtyFailures++;
   393                     dirtyFailures++;
   390 
   394 
       
   395                     if (e instanceof UnmarshalException
       
   396                             && e.getCause() instanceof InvalidClassException) {
       
   397                         DGCImpl.dgcLog.log(Log.BRIEF, "InvalidClassException exception in DGC dirty call", e);
       
   398                         return;             // protocol error, do not register these refs
       
   399                     }
       
   400 
   391                     if (dirtyFailures == 1) {
   401                     if (dirtyFailures == 1) {
   392                         /*
   402                         /*
   393                          * If this was the first recent failed dirty call,
   403                          * If this was the first recent failed dirty call,
   394                          * reschedule another one immediately, in case there
   404                          * reschedule another one immediately, in case there
   395                          * was just a transient network problem, and remember
   405                          * was just a transient network problem, and remember