changeset 246:f31f2debfdca

merge with jdk7-b123
author mcimadamore
date Wed, 05 Jan 2011 09:58:20 +0000
parents 70c925672d2d (current diff) f90b3e014e83 (diff)
children 8ee094220abc
files
diffstat 50 files changed, 310 insertions(+), 79 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Dec 14 12:59:16 2010 +0000
+++ b/.hgtags	Wed Jan 05 09:58:20 2011 +0000
@@ -96,3 +96,5 @@
 39829414ae31a0080578a49b751899edd518cd7d jdk7-b119
 cff5a173ec1e89013359e804a3e31736ef6fb462 jdk7-b120
 2cc9f32992101732b23730b737740e64ebc5fa89 jdk7-b121
+1523a060032c8a5b7840198da8911abeff88118f jdk7-b122
+a230c142628cea22475ab9dc5cd544266ddf2466 jdk7-b123
--- a/make/Makefile	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/Makefile	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/com/sun/corba/minclude/com_sun_corba_se_impl_io.jmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/com/sun/corba/minclude/com_sun_corba_se_impl_io.jmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/Defs-linux.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/Defs-linux.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/Defs-solaris.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/Defs-solaris.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/Defs-windows.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/Defs-windows.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/Defs.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/Defs.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/Rules.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/Rules.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/shared/Defs-java.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/shared/Defs-java.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/shared/Defs-linux.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/shared/Defs-linux.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/shared/Defs-solaris.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/shared/Defs-solaris.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/shared/Defs-windows.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/shared/Defs-windows.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/shared/Defs.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/shared/Defs.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/shared/Platform.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/common/shared/Platform.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -383,7 +383,7 @@
 
 REQUIRED_ZIP_VER = 2.2
 REQUIRED_UNZIP_VER = 5.12
-REQUIRED_MAKE_VER = 3.78
+REQUIRED_MAKE_VER = 3.81
 
 # Unix type settings (same for all unix platforms)
 ifneq ($(PLATFORM), windows)
--- a/make/org/omg/idl/Makefile	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/org/omg/idl/Makefile	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/sun/corba/Makefile	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/sun/corba/Makefile	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/sun/corba/core/Makefile	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/sun/corba/core/Makefile	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/sun/rmi/rmic/FILES.gmk	Tue Dec 14 12:59:16 2010 +0000
+++ b/make/sun/rmi/rmic/FILES.gmk	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerWriteStream.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/encoding/BufferManagerWriteStream.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,12 +30,14 @@
 import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
 import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase;
 import com.sun.corba.se.impl.protocol.giopmsgheaders.FragmentMessage;
+import com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage;
 import com.sun.corba.se.impl.encoding.BufferManagerWrite;
 import com.sun.corba.se.impl.encoding.ByteBufferWithInfo;
 import com.sun.corba.se.impl.encoding.CDROutputObject;
 import com.sun.corba.se.spi.orb.ORB;
 import com.sun.corba.se.pept.transport.Connection;
 import com.sun.corba.se.pept.encoding.OutputObject;
+import org.omg.CORBA.SystemException;
 
 /**
  * Streaming buffer manager.
@@ -66,7 +68,13 @@
         // Set the fragment's moreFragments field to true
         MessageBase.setFlag(bbwi.byteBuffer, Message.MORE_FRAGMENTS_BIT);
 
-        sendFragment(false);
+        try {
+           sendFragment(false);
+        } catch(SystemException se){
+                orb.getPIHandler().invokeClientPIEndingPoint(
+                        ReplyMessage.SYSTEM_EXCEPTION, se);
+                throw se;
+        }
 
         // Reuse the old buffer
 
--- a/src/share/classes/com/sun/corba/se/impl/interceptors/ClientRequestInfoImpl.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/interceptors/ClientRequestInfoImpl.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/com/sun/corba/se/impl/interceptors/PIHandlerImpl.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/interceptors/PIHandlerImpl.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/com/sun/corba/se/impl/interceptors/PINoOpHandlerImpl.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/interceptors/PINoOpHandlerImpl.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/com/sun/corba/se/impl/interceptors/RequestInfoImpl.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/interceptors/RequestInfoImpl.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -85,6 +85,9 @@
 
     private static Hashtable translatedFields;
 
+    /** true if represents enum type */
+    private boolean isEnum;
+
     private static final Bridge bridge =
         (Bridge)AccessController.doPrivileged(
             new PrivilegedAction() {
@@ -359,6 +362,7 @@
         }
 
         name = cl.getName();
+        isEnum = Enum.class.isAssignableFrom(cl);
         superclass = superdesc;
         serializable = serial;
         if (!forProxyClass) {
@@ -401,7 +405,8 @@
         if (!serializable ||
             externalizable ||
             forProxyClass ||
-            name.equals("java.lang.String")) {
+            name.equals("java.lang.String") ||
+            isEnum) {
             fields = NO_FIELDS;
         } else if (serializable) {
             /* Ask for permission to override field access checks.
@@ -502,7 +507,7 @@
          *
          * NonSerializable classes have a serialVerisonUID of 0L.
          */
-         if (isNonSerializable()) {
+         if (isNonSerializable() || isEnum) {
              suid = 0L;
          } else {
              // Lookup special Serializable members using reflection.
--- a/src/share/classes/com/sun/corba/se/impl/oa/poa/AOMEntry.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/oa/poa/AOMEntry.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,10 @@
 import com.sun.corba.se.impl.orbutil.concurrent.Mutex ;
 import com.sun.corba.se.impl.orbutil.concurrent.CondVar ;
 
+import org.omg.CORBA.SystemException ;
+
+import org.omg.PortableServer.POAPackage.ObjectAlreadyActive ;
+
 /** AOMEntry represents a Servant or potential Servant in the ActiveObjectMap.
 * It may be in several states to allow for long incarnate or etherealize operations.
 * The methods on this class mostly represent input symbols to the state machine
@@ -121,6 +125,12 @@
         }
     } ;
 
+    private static Action oaaAction = new ActionBase( "throwObjectAlreadyActive" ) {
+         public void doIt( FSM fsm, Input in ) {
+             throw new RuntimeException( new ObjectAlreadyActive() ) ;
+         }
+    } ;
+
     private static Guard waitGuard = new GuardBase( "wait" ) {
         public Guard.Result evaluate( FSM fsm, Input in ) {
             AOMEntry entry = (AOMEntry)fsm ;
@@ -173,19 +183,23 @@
         engine.add( INCARN,  START_ETH, waitGuard,              null,               INCARN      ) ;
         engine.add( INCARN,  INC_DONE,                          null,               VALID       ) ;
         engine.add( INCARN,  INC_FAIL,                          decrementAction,    INVALID     ) ;
+        engine.add( INCARN,  ACTIVATE,                          oaaAction,          INCARN      ) ;
 
         engine.add( VALID,   ENTER,                             incrementAction,    VALID       ) ;
         engine.add( VALID,   EXIT,                              decrementAction,    VALID       ) ;
         engine.add( VALID,   START_ETH, greaterZeroGuard,       null,               ETHP        ) ;
         engine.add( VALID,   START_ETH, zeroGuard,              null,               ETH         ) ;
+        engine.add( VALID,   ACTIVATE,                          oaaAction,          VALID       ) ;
 
         engine.add( ETHP,    ENTER,     waitGuard,              null,               ETHP        ) ;
         engine.add( ETHP,    START_ETH,                         null,               ETHP        ) ;
         engine.add( ETHP,    EXIT,      greaterOneGuard,        decrementAction,    ETHP        ) ;
         engine.add( ETHP,    EXIT,      oneGuard,               decrementAction,    ETH         ) ;
+        engine.add( ETHP,    ACTIVATE,                          oaaAction,          ETHP        ) ;
 
         engine.add( ETH,     START_ETH,                         null,               ETH         ) ;
         engine.add( ETH,     ETH_DONE,                          null,               DESTROYED   ) ;
+        engine.add( ETH,     ACTIVATE,                          oaaAction,          ETH         ) ;
         engine.add( ETH,     ENTER,     waitGuard,              null,               ETH         ) ;
 
         engine.setDefault( DESTROYED, throwIllegalStateExceptionAction, DESTROYED ) ;
@@ -217,7 +231,17 @@
     public void etherealizeComplete() { doIt( ETH_DONE ) ; }
     public void incarnateComplete() { doIt( INC_DONE ) ; }
     public void incarnateFailure() { doIt( INC_FAIL ) ; }
-    public void activateObject() { doIt( ACTIVATE ) ; }
+    public void activateObject() throws ObjectAlreadyActive {
+         try {
+             doIt( ACTIVATE ) ;
+         } catch (RuntimeException exc) {
+             Throwable thr = exc.getCause() ;
+             if (thr instanceof ObjectAlreadyActive)
+                 throw (ObjectAlreadyActive)thr ;
+             else
+                 throw exc ;
+         }
+    }
     public void enter() { doIt( ENTER ) ; }
     public void exit() { doIt( EXIT ) ; }
 }
--- a/src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/oa/poa/POAPolicyMediatorBase_R.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -107,13 +107,9 @@
             throw new ServantAlreadyActive();
         ActiveObjectMap.Key key = new ActiveObjectMap.Key( id ) ;
 
-        // Note that this can't happen for system assigned IDs since the
-        // POA never hands out the same ID.  However, we make this redundant
-        // check here to share the code.
-        if (activeObjectMap.containsKey(key))
-            throw new ObjectAlreadyActive() ;
+        AOMEntry entry = activeObjectMap.get( key ) ;
 
-        AOMEntry entry = activeObjectMap.get( key ) ;
+        // Check for an ObjectAlreadyActive error
         entry.activateObject() ;
         activateServant( key, entry, servant ) ;
     }
--- a/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -245,7 +245,14 @@
     // All access to resolver, localResolver, and urlOperation must be protected using
     // resolverLock.  Do not hold the ORBImpl lock while accessing
     // resolver, or deadlocks may occur.
-    private Object resolverLock ;
+    // Note that we now have separate locks for each resolver type.  This is due
+    // to bug 6980681 and 6238477, which was caused by a deadlock while resolving a
+    // corbaname: URL that contained a reference to the same ORB as the
+    // ORB making the call to string_to_object.  This caused a deadlock between the
+    // client thread holding the single lock for access to the urlOperation,
+    // and the server thread handling the client is_a request waiting on the
+    // same lock to access the localResolver.
+
 
     // Used for resolver_initial_references and list_initial_services
     private Resolver resolver ;
@@ -255,8 +262,14 @@
 
     // Converts strings to object references for resolvers and string_to_object
     private Operation urlOperation ;
+    private final Object urlOperationLock = new java.lang.Object() ;
 
     private CorbaServerRequestDispatcher insNamingDelegate ;
+    // resolverLock must be used for all access to either resolver or
+    // localResolver, since it is possible for the resolver to indirectly
+    // refer to the localResolver.  Also used to protect access to
+    // insNamingDelegate.
+    private final Object resolverLock = new Object() ;
 
     private TaggedComponentFactoryFinder taggedComponentFactoryFinder ;
 
@@ -396,7 +409,6 @@
             }
         };
 
-        resolverLock = new java.lang.Object() ;
 
         requestDispatcherRegistry = new RequestDispatcherRegistryImpl(
             this, ORBConstants.DEFAULT_SCID);
@@ -832,7 +844,7 @@
         if (str == null)
             throw wrapper.nullParam() ;
 
-        synchronized (resolverLock) {
+        synchronized (urlOperationLock) {
             org.omg.CORBA.Object obj = (org.omg.CORBA.Object)op.operate( str ) ;
             return obj ;
         }
@@ -1778,7 +1790,7 @@
      */
     public void setURLOperation( Operation stringToObject )
     {
-        synchronized (resolverLock) {
+        synchronized (urlOperationLock) {
             urlOperation = stringToObject ;
         }
     }
@@ -1788,7 +1800,7 @@
      */
     public Operation getURLOperation()
     {
-        synchronized (resolverLock) {
+        synchronized (urlOperationLock) {
             return urlOperation ;
         }
     }
--- a/src/share/classes/com/sun/corba/se/impl/orbutil/CorbaResourceUtil.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/CorbaResourceUtil.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_pt_BR.properties	Wed Jan 05 09:58:20 2011 +0000
@@ -0,0 +1,107 @@
+
+# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+orbd.usage=Uso: {0} <options> \n\nem que <options> inclui:\n  -port                  porta de ativa\u00e7\u00e3o na qual o ORBD deve ser iniciado, padr\u00e3o 1049 (opcional)\n  -defaultdb             diret\u00f3rio dos arquivos ORBD, padr\u00e3o "./orb.db" (opcional)\n  -serverid              id do servidor para ORBD, padr\u00e3o 1 (opcional)\n  -ORBInitialPort        porta inicial (necess\u00e1rio)\n  -ORBInitialHost        nome de host inicial (necess\u00e1rio)\n
+
+servertool.usage=Uso: {0} <options> \n\nem que <options> inclui:\n  -ORBInitialPort        porta inicial (necess\u00e1rio)\n  -ORBInitialHost        nome de host inicial (necess\u00e1rio)\n
+servertool.banner=\n\nBem-vindo a ferramenta de servidor IDL Java \ninsira os comandos no prompt \n
+servertool.shorthelp=\n\n\tComandos dispon\u00edveis: \n\t------------------- \n
+servertool.baddef=Servidor mal definido: {0}
+servertool.nosuchserver=\tservidor n\u00e3o encontrado.
+servertool.helddown=\to servidor est\u00e1 em espera.
+servertool.nosuchorb=\tORB inv\u00e1lido.
+servertool.serverup=\to servidor j\u00e1 est\u00e1 ativo.
+servertool.appname=\tapplicationName     - {0}
+servertool.name=\tname      - {0}
+servertool.classpath=\tclasspath - {0}
+servertool.args=\targs      - {0}
+servertool.vmargs=\tvmargs    - {0}
+servertool.serverid=\tserver id - {0}
+servertool.servernotrunning=\to servidor n\u00e3o est\u00e1 em execu\u00e7\u00e3o.
+servertool.register=\n\n\tregister -server <server class name> \n\t         -applicationName <alternate server name> \n\t         -classpath <classpath to server> \n\t         -args <args to server> \n\t         -vmargs <args to server Java VM>\n
+servertool.register1=registra um servidor ativ\u00e1vel
+servertool.register2=\tservidor registrado (serverid = {0}).
+servertool.register3=\tservidor registrado, mas em espera (serverid = {0}).
+servertool.register4=\tservidor j\u00e1 registrado (serverid = {0}).
+
+servertool.unregister=\n\tunregister [ -serverid <server id> | -applicationName <name> ] \n
+servertool.unregister1=cancela o registro de um servidor registrado
+servertool.unregister2=\tservidor n\u00e3o registrado.
+
+servertool.locate=\n\tlocate [ -serverid <server id> | -applicationName <name> ] [ <-endpointType <endpointType> ] \n
+servertool.locate1=localiza portas de tipo espec\u00edfico para um servidor registrado
+servertool.locate2=\n\n\tNome do host {0} \n\n\t\tPorta\t\tTipo de porta\t\tId do ORB\n\t\t----\t\t---------\t\t------\n
+servertool.locateorb=\n\tlocateperorb [ -serverid <server id> | -applicationName <name> ] [ -orbid <ORB name> ]\n
+servertool.locateorb1=localiza portas para um orb espec\u00edfico de servidor registrado
+servertool.locateorb2=\n\n\tNome do host {0} \n\n\t\tPorta\t\tTipo de porta\t\tId do ORB\n\t\t----\t\t--------\t\t------\n
+servertool.getserverid=\n\tgetserverid [ -applicationName <name> ] \n
+servertool.getserverid1=retorna o id do servidor de um applicationName
+servertool.getserverid2=\tID do servidor de applicationName {0} \u00e9 {1}
+
+servertool.list=\n\tlist\n
+servertool.list1=lista todos os servidores registrados
+servertool.list2=\n\tId do servidor\tNome de classe do servidor\t\tAplicativo do servidor\n\t---------\t-----------------\t\t------------------\n
+servertool.listactive=\n\tlistactive
+servertool.listactive1=lista os servidores atualmente ativos
+servertool.listappnames=\tlistappnames\n
+servertool.listappnames1=lista os applicationNames atualmente definidos
+servertool.listappnames2=applicationNames do servidor atualmente definidos:
+
+servertool.shutdown=\n\tshutdown [ -serverid <server id> | -applicationName <name> ]\n
+servertool.shutdown1=desliga um servidor registrado
+servertool.shutdown2=\tservidor desligado com \u00eaxito.
+servertool.startserver=\n\tstartup [ -serverid <server id> | -applicationName <name> ]\n
+servertool.startserver1=inicia um servidor registrado
+servertool.startserver2=\tservidor iniciado com \u00eaxito.
+
+servertool.quit=\n\tquit\n
+servertool.quit1=sai desta ferramenta
+
+servertool.help=\thelp\n\tOR\n\thelp <command name>\n
+servertool.help1=obt\u00e9m ajuda
+
+servertool.orbidmap=\tUso: orblist [ -serverid <server id> | -applicationName <name> ]\n
+servertool.orbidmap1=lista de nomes de orb e seus mapeamentos
+servertool.orbidmap2=\n\tId de ORB\t\tNome de ORB\n\t------\t\t--------\n
+pnameserv.success=NameServer persistente iniciado com \u00eaxito
+
+
+bootstrap.usage=Uso: {0} <options> \n\nem que <options> inclui:\n  -ORBInitialPort        porta inicial (necess\u00e1rio)\n  -InitialServicesFile   arquivo que cont\u00e9m a lista de servi\u00e7os iniciais (necess\u00e1rio)\n
+bootstrap.success=configurando porta para {0} e lendo servi\u00e7os de {1}
+bootstrap.filenotreadable=o arquivo {0} n\u00e3o \u00e9 leg\u00edvel
+bootstrap.filenotfound=arquivo {0} n\u00e3o encontrado
+bootstrap.exception=exce\u00e7\u00e3o capturada ao salvar as propriedades no arquivo {0}: Exce\u00e7\u00e3o {1}
+
+tnameserv.exception=uma exce\u00e7\u00e3o capturada ao iniciar o servi\u00e7o de inicializa\u00e7\u00e3o na porta {0}
+tnameserv.usage=tente usar outra porta com os argumentos de linha de comando -ORBInitialPort <portno>
+tnameserv.invalidhostoption=ORBInitialHost n\u00e3o \u00e9 uma op\u00e7\u00e3o v\u00e1lida para NameService
+tnameserv.orbinitialport0=ORBInitialPort 0 n\u00e3o \u00e9 uma op\u00e7\u00e3o v\u00e1lida para NameService
+tnameserv.hs1=Contexto de nomea\u00e7\u00e3o inicial:\n{0}
+tnameserv.hs2=TransientNameServer: definindo porta para as refer\u00eancias de objeto iniciais: {0}
+tnameserv.hs3=Pronto.
+
+orbd.commfailure=\nFalha ao iniciar ORBD porque ORBinitialPort j\u00e1 est\u00e1 em uso
+orbd.internalexception=\nFalha ao iniciar ORBD devido a uma exce\u00e7\u00e3o interna. \nPoss\u00edveis causas: \n1. ORBInitialPort especificado ou ORBActivationPort j\u00e1 em uso \n2. Sem permiss\u00e3o de grava\u00e7\u00e3o para gravar orb.db 
+
--- a/src/share/classes/com/sun/corba/se/impl/presentation/rmi/ExceptionHandlerImpl.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/presentation/rmi/ExceptionHandlerImpl.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -122,9 +122,6 @@
     implements
         ClientRequestDispatcher
 {
-    // Used for locking
-    private Object lock = new Object();
-
     public OutputObject beginRequest(Object self, String opName,
                                      boolean isOneWay, ContactInfo contactInfo)
     {
@@ -151,7 +148,8 @@
 
         // This locking is done so that multiple connections are not created
         // for the same endpoint
-        synchronized (lock) {
+        //6929137 - Synchronized on contactInfo to avoid blocking across multiple endpoints
+        synchronized (contactInfo) {
             if (contactInfo.isConnectionBased()) {
                 if (contactInfo.shouldCacheConnection()) {
                     connection = (CorbaConnection)
@@ -256,7 +254,7 @@
         registerWaiter(messageMediator);
 
         // Do connection reclaim now
-        synchronized (lock) {
+        synchronized (contactInfo) {
             if (contactInfo.isConnectionBased()) {
                 if (contactInfo.shouldCacheConnection()) {
                     OutboundConnectionCache connectionCache =
@@ -387,11 +385,15 @@
             boolean retry  =
                 getContactInfoListIterator(orb)
                     .reportException(messageMediator.getContactInfo(), e);
+
+            //Bug 6382377: must not lose exception in PI
+
+            // Must run interceptor end point before retrying.
+            Exception newException =
+                    orb.getPIHandler().invokeClientPIEndingPoint(
+                    ReplyMessage.SYSTEM_EXCEPTION, e);
+
             if (retry) {
-                // Must run interceptor end point before retrying.
-                Exception newException =
-                    orb.getPIHandler().invokeClientPIEndingPoint(
-                        ReplyMessage.SYSTEM_EXCEPTION, e);
                 if (newException == e) {
                     continueOrThrowSystemOrRemarshal(messageMediator,
                                                      new RemarshalException());
@@ -400,6 +402,14 @@
                                                      newException);
                 }
             } else {
+                if (newException instanceof RuntimeException){
+                    throw (RuntimeException)newException;
+                }
+                else if (newException instanceof RemarshalException)
+                {
+                    throw (RemarshalException)newException;
+                }
+
                 // NOTE: Interceptor ending point will run in releaseReply.
                 throw e;
             }
--- a/src/share/classes/com/sun/corba/se/impl/transport/CorbaConnectionCacheBase.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/transport/CorbaConnectionCacheBase.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
 
 import com.sun.corba.se.spi.logging.CORBALogDomains;
 import com.sun.corba.se.spi.orb.ORB;
+import com.sun.corba.se.spi.transport.CorbaConnection;
 import com.sun.corba.se.spi.transport.CorbaConnectionCache;
 
 import com.sun.corba.se.impl.logging.ORBUtilSystemException;
@@ -87,6 +88,14 @@
         }
     }
 
+    public void close() {
+        synchronized (backingStore()) {
+            for (Object obj : values()) {
+                ((CorbaConnection)obj).closeConnectionResources() ;
+            }
+        }
+    }
+
     public long numberOfIdleConnections()
     {
         long count = 0;
--- a/src/share/classes/com/sun/corba/se/impl/transport/CorbaTransportManagerImpl.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/transport/CorbaTransportManagerImpl.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,7 @@
 import org.omg.CORBA.CompletionStatus;
 
 import com.sun.corba.se.pept.transport.Acceptor;
+import com.sun.corba.se.pept.transport.ConnectionCache;
 import com.sun.corba.se.pept.transport.ByteBufferPool;
 import com.sun.corba.se.pept.transport.ContactInfo;
 import com.sun.corba.se.pept.transport.InboundConnectionCache;
@@ -49,6 +50,8 @@
 import com.sun.corba.se.spi.orb.ORB;
 import com.sun.corba.se.spi.transport.CorbaAcceptor;
 import com.sun.corba.se.spi.transport.CorbaTransportManager;
+import com.sun.corba.se.pept.transport.Connection;
+import com.sun.corba.se.pept.transport.ConnectionCache;
 
 // REVISIT - impl/poa specific:
 import com.sun.corba.se.impl.oa.poa.Policies;
@@ -182,6 +185,12 @@
             if (orb.transportDebugFlag) {
                 dprint(".close->");
             }
+            for (Object cc : outboundConnectionCaches.values()) {
+                ((ConnectionCache)cc).close() ;
+            }
+            for (Object cc : inboundConnectionCaches.values()) {
+                ((ConnectionCache)cc).close() ;
+            }
             getSelector(0).close();
         } finally {
             if (orb.transportDebugFlag) {
--- a/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/transport/SelectorImpl.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
 import java.nio.channels.Selector;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Map;
 import java.util.Iterator;
 import java.util.List;
 
@@ -66,7 +67,7 @@
     private List deferredRegistrations;
     private List interestOpsList;
     private HashMap listenerThreads;
-    private HashMap readerThreads;
+    private Map readerThreads;
     private boolean selectorStarted;
     private boolean closed;
     private ORBUtilSystemException wrapper ;
@@ -81,7 +82,7 @@
         deferredRegistrations = new ArrayList();
         interestOpsList = new ArrayList();
         listenerThreads = new HashMap();
-        readerThreads = new HashMap();
+        readerThreads = java.util.Collections.synchronizedMap(new HashMap());
         closed = false;
         wrapper = ORBUtilSystemException.get(orb,CORBALogDomains.RPC_TRANSPORT);
     }
@@ -178,8 +179,13 @@
         }
 
         if (eventHandler.shouldUseSelectThreadToWait()) {
-            SelectionKey selectionKey = eventHandler.getSelectionKey();
-            selectionKey.cancel();
+            SelectionKey selectionKey ;
+            synchronized(deferredRegistrations) {
+                selectionKey = eventHandler.getSelectionKey();
+            }
+            if (selectionKey != null) {
+                selectionKey.cancel();
+            }
             selector.wakeup();
             return;
         }
--- a/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/transport/SocketOrChannelConnectionImpl.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -811,6 +811,7 @@
                     dprint(".close: " + this, e);
                 }
             }
+            closeConnectionResources();
         } finally {
             if (orb.transportDebugFlag) {
                 dprint(".close<-: " + this);
@@ -818,6 +819,28 @@
         }
     }
 
+    public void closeConnectionResources() {
+           if (orb.transportDebugFlag) {
+               dprint(".closeConnectionResources->: " + this);
+           }
+           Selector selector = orb.getTransportManager().getSelector(0);
+           selector.unregisterForEvent(this);
+           try {
+             if (socketChannel != null)
+              socketChannel.close() ;
+                if (socket != null && !socket.isClosed())
+                socket.close() ;
+           } catch (IOException e) {
+             if (orb.transportDebugFlag) {
+                 dprint( ".closeConnectionResources: " + this, e ) ;
+             }
+           }
+           if (orb.transportDebugFlag) {
+               dprint(".closeConnectionResources<-: " + this);
+           }
+     }
+
+
     public Acceptor getAcceptor()
     {
         return acceptor;
--- a/src/share/classes/com/sun/corba/se/pept/transport/ConnectionCache.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/pept/transport/ConnectionCache.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,6 +41,12 @@
     public long numberOfBusyConnections();
 
     public boolean reclaim();
+
+    /** Close all connections in the connection cache.
+     * This is used as a final cleanup, and will result
+     * in abrupt termination of any pending communications.
+     */
+    public void close();
 }
 
 // End of file.
--- a/src/share/classes/com/sun/corba/se/spi/protocol/PIHandler.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/spi/protocol/PIHandler.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/com/sun/corba/se/spi/transport/CorbaConnection.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/corba/se/spi/transport/CorbaConnection.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -163,6 +163,10 @@
     // REVISIT - MessageMediator parameter?
     public void serverRequestProcessingBegins();
     public void serverRequestProcessingEnds();
+
+    /** Clean up all connection resources.  Used when shutting down an ORB.
+     */
+    public void closeConnectionResources();
 }
 
 // End of file.
--- a/src/share/classes/com/sun/tools/corba/se/idl/constExpr/Expression.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/tools/corba/se/idl/constExpr/Expression.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Stub.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Stub.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -344,17 +344,27 @@
     stream.println ("     String str = s.readUTF ();");
     stream.println ("     String[] args = null;");
     stream.println ("     java.util.Properties props = null;");
-    stream.println ("     org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);");
+    stream.println ("     org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);");
+    stream.println ("   try {");
+    stream.println ("     org.omg.CORBA.Object obj = orb.string_to_object (str);");
     stream.println ("     org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();");
     stream.println ("     _set_delegate (delegate);");
+    stream.println ("   } finally {");
+    stream.println ("     orb.destroy() ;");
+    stream.println ("   }");
     stream.println ("  }");
     stream.println ();
     stream.println ("  private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException");
     stream.println ("  {");
     stream.println ("     String[] args = null;");
     stream.println ("     java.util.Properties props = null;");
-    stream.println ("     String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);");
+    stream.println ("     org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props);");
+    stream.println ("   try {");
+    stream.println ("     String str = orb.object_to_string (this);");
     stream.println ("     s.writeUTF (str);");
+    stream.println ("   } finally {");
+    stream.println ("     orb.destroy() ;");
+    stream.println ("   }");
     stream.println ("  }");
   }
 
--- a/src/share/classes/javax/rmi/PortableRemoteObject.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/javax/rmi/PortableRemoteObject.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/org/omg/CORBA/ORB.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/org/omg/CORBA/ORB.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/org/omg/CORBA/SetOverrideType.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/org/omg/CORBA/SetOverrideType.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/org/omg/CORBA/TCKind.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/org/omg/CORBA/TCKind.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/org/omg/CORBA/UnknownUserException.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/org/omg/CORBA/UnknownUserException.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/org/omg/CORBA/portable/ServantObject.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/org/omg/CORBA/portable/ServantObject.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/org/omg/CosNaming/nameservice.idl	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/org/omg/CosNaming/nameservice.idl	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/src/share/classes/sun/corba/Bridge.java	Tue Dec 14 12:59:16 2010 +0000
+++ b/src/share/classes/sun/corba/Bridge.java	Wed Jan 05 09:58:20 2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it