Return-Path: X-Original-To: apmail-geronimo-dev-archive@www.apache.org Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 511FF7AEB for ; Wed, 3 Aug 2011 04:26:57 +0000 (UTC) Received: (qmail 49769 invoked by uid 500); 3 Aug 2011 04:26:53 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 49281 invoked by uid 500); 3 Aug 2011 04:26:43 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 49267 invoked by uid 99); 3 Aug 2011 04:26:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2011 04:26:41 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of forrestxm@gmail.com designates 209.85.213.54 as permitted sender) Received: from [209.85.213.54] (HELO mail-yw0-f54.google.com) (209.85.213.54) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Aug 2011 04:26:32 +0000 Received: by ywm39 with SMTP id 39so323794ywm.13 for ; Tue, 02 Aug 2011 21:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Ib9T7u/NrgNeXCNv780Mqbu0byl0SYaP0MZjrofq9ng=; b=MlEaPnDkEbbi/CnNwU/Z7AvqDTwdag9vOM42AnLMVkCOZACeQT1PphpRU68jJpqSW8 RRVTav8QRfwEEU3Zyos6gowXm3Vu1V7I7o/xRs/VJFck8xi5iWSgQMfnOCSecb7gpKB4 5+BDOxHF9Cm7HsgFs5UnVkNdVpqyQ+LIoQSjo= MIME-Version: 1.0 Received: by 10.236.173.226 with SMTP id v62mr5595014yhl.186.1312345571215; Tue, 02 Aug 2011 21:26:11 -0700 (PDT) Received: by 10.236.41.5 with HTTP; Tue, 2 Aug 2011 21:26:10 -0700 (PDT) In-Reply-To: <20110803004205.81C42238896F@eris.apache.org> References: <20110803004205.81C42238896F@eris.apache.org> Date: Wed, 3 Aug 2011 12:26:10 +0800 Message-ID: Subject: Re: svn commit: r1153313 - in /geronimo/yoko/trunk: yoko-core/src/main/java/org/apache/yoko/orb/OB/ yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/util/ From: Forrest Xia To: dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=20cf30563e45984af104a992430e X-Virus-Checked: Checked by ClamAV on apache.org --20cf30563e45984af104a992430e Content-Type: text/plain; charset=ISO-8859-1 Hi David, A quick test with this new fix, but hit a classloading problem like this: Caused by: java.lang.LinkageError: loading constraint violation: loader "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader@3b0c3b0c" previously initiated loading for a different type with name "org/omg/CORBA/ValueDefPackage/FullValueDescription" defined by loader "com/ibm/oti/vm/BootstrapClassLoader@547d547d" at org.apache.yoko.rmi.impl.TypeRepository.getDescriptor(TypeRepository.java:338) at org.apache.yoko.rmi.impl.ValueHandlerImpl.desc(ValueHandlerImpl.java:55) at org.apache.yoko.rmi.impl.ValueHandlerImpl.readValue0(ValueHandlerImpl.java:91) at org.apache.yoko.rmi.impl.ValueHandlerImpl.readValue(ValueHandlerImpl.java:76) at org.apache.yoko.orb.OB.ValueReader.readRMIValue(ValueReader.java:969) at org.apache.yoko.orb.OB.ValueReader$FactoryCreationStrategy.create(ValueReader.java:299) at org.apache.yoko.orb.OB.ValueReader.readValueAny(ValueReader.java:1549) at org.apache.yoko.orb.CORBA.InputStream.read_value(InputStream.java:1916) at org.apache.yoko.orb.CORBA.Any.readValue(Any.java:210) at org.apache.yoko.orb.CORBA.Any.read_value(Any.java:505) at org.apache.yoko.orb.CORBA.InputStream.read_any(InputStream.java:1806) at org.apache.yoko.rmi.impl.UtilImpl.readAny(UtilImpl.java:309) at org.apache.geronimo.corba.util.UtilDelegateImpl.readAny(UtilDelegateImpl.java:111) at javax.rmi.CORBA.Util.readAny(Util.java:95) at org.apache.yoko.rmi.impl.AnyDescriptor.read(AnyDescriptor.java:36) at org.apache.yoko.rmi.impl.MethodDescriptor.readResult(MethodDescriptor.java:274) at org.apache.yoko.rmi.impl.RMIStubHandler.invoke(RMIStubHandler.java:79) at org.apache.geronimo.yoko.RMIStubHandler.invoke(RMIStubHandler.java:45) ... 51 more Forrest On Wed, Aug 3, 2011 at 8:42 AM, wrote: > Author: djencks > Date: Wed Aug 3 00:42:03 2011 > New Revision: 1153313 > > URL: http://svn.apache.org/viewvc?rev=1153313&view=rev > Log: > YOKO-434 better implementation of figuring out if remote objects were > custom marshalled > > Modified: > > geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java > > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDValueDescriptor.java > > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java > > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java > > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/util/ClassLoaderLocal.java > > Modified: > geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java > URL: > http://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java?rev=1153313&r1=1153312&r2=1153313&view=diff > > ============================================================================== > --- > geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java > (original) > +++ > geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/ValueReader.java > Wed Aug 3 00:42:03 2011 > @@ -71,7 +71,7 @@ final public class ValueReader { > > String[] ids; > > - ChunkState state; > + final ChunkState state; > > Header next; // Java only > String codebase; // Java only > > Modified: > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDValueDescriptor.java > URL: > http://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDValueDescriptor.java?rev=1153313&r1=1153312&r2=1153313&view=diff > > ============================================================================== > --- > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDValueDescriptor.java > (original) > +++ > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDValueDescriptor.java > Wed Aug 3 00:42:03 2011 > @@ -20,6 +20,7 @@ package org.apache.yoko.rmi.impl; > import org.omg.CORBA.AttributeDescription; > import org.omg.CORBA.TypeCode; > import org.omg.CORBA.ValueDefPackage.FullValueDescription; > +import org.omg.CORBA.ValueMember; > > /** > * @author krab > @@ -44,24 +45,24 @@ public class FVDValueDescriptor extends > public void init() { > super.init(); > > - // iverride custom loading > - if (!fvd.is_custom) { > - _read_object_method = null; > - _write_object_method = null; > - _is_externalizable = false; > - } > - > - AttributeDescription[] atts = fvd.attributes; > - FieldDescriptor[] new_fields = new FieldDescriptor[atts.length]; > - for (int i = 0; i < atts.length; i++) { > - AttributeDescription att = atts[i]; > - new_fields[i] = findField(att); > + // don't override custom loading. Our local version could work > differently. > +// if (!fvd.is_custom) { > +// _read_object_method = null; > +// _write_object_method = null; > +// _is_externalizable = false; > +// } > + > + ValueMember[] members = fvd.members; > + FieldDescriptor[] new_fields = new > FieldDescriptor[members.length]; > + for (int i = 0; i < members.length; i++) { > + ValueMember valueMember = members[i]; > + new_fields[i] = findField(valueMember); > } > > _fields = new_fields; > } > > - FieldDescriptor findField(AttributeDescription att) { > + FieldDescriptor findField(ValueMember valueMember) { > FieldDescriptor result = null; > > for (Class c = getJavaClass(); c != null; c = c.getSuperclass()) { > @@ -75,7 +76,7 @@ public class FVDValueDescriptor extends > } > > for (int i = 0; i < fds.length; i++) { > - if (fds[i].getIDLName().equals(att.name)) { > + if (fds[i].getIDLName().equals(valueMember.name)) { > return fds[0]; > } > } > @@ -103,7 +104,7 @@ public class FVDValueDescriptor extends > * > * @see org.apache.yoko.rmi.impl.TypeDescriptor#getTypeCode() > */ > - TypeCode getTypeCode() { > + public TypeCode getTypeCode() { > return fvd.type; > } > > > Modified: > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java > URL: > http://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java?rev=1153313&r1=1153312&r2=1153313&view=diff > > ============================================================================== > --- > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java > (original) > +++ > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeRepository.java > Wed Aug 3 00:42:03 2011 > @@ -18,6 +18,8 @@ > > package org.apache.yoko.rmi.impl; > > +import java.lang.reflect.Method; > +import java.util.concurrent.ConcurrentHashMap; > import java.util.logging.Logger; > import java.util.logging.Level; > > @@ -37,76 +39,58 @@ public class TypeRepository { > > org.omg.CORBA.ORB orb; > > - java.util.Map classMap = new java.util.HashMap(); > + java.util.Map classMap = new > ConcurrentHashMap (); > > - java.util.Map repidMap = new java.util.HashMap(); > + java.util.Map repidMap = new > ConcurrentHashMap(); > > public TypeRepository(org.omg.CORBA.ORB orb) { > this.orb = orb; > - init(); > - } > - > - org.omg.CORBA.ORB getORB() { > - return orb; > - } > - > - void init() { > TypeDescriptor desc; > > desc = new AnyDescriptor(java.lang.Object.class, this); > - synchronized (desc) { > - classMap.put(java.lang.Object.class, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(java.lang.Object.class, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > > desc = new AnyDescriptor(java.lang.Object.class, this); > - synchronized (desc) { > - classMap.put(java.lang.Object.class, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(java.lang.Object.class, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > > desc = new StringDescriptor(this); > - synchronized (desc) { > - classMap.put(String.class, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(String.class, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > > desc = new ClassDescriptor(this); > - synchronized (desc) { > - classMap.put(Class.class, desc); > - classMap.put(javax.rmi.CORBA.ClassDesc.class, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(Class.class, desc); > + classMap.put(javax.rmi.CORBA.ClassDesc.class, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > > desc = new DateValueDescriptor(this); > - synchronized (desc) { > - classMap.put(java.util.Date.class, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(java.util.Date.class, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > + > desc = new AnyDescriptor(java.io.Externalizable.class, this); > - synchronized (desc) { > - classMap.put(java.io.Externalizable.class, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(java.io.Externalizable.class, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > > desc = new AnyDescriptor(java.io.Serializable.class, this); > - synchronized (desc) { > - classMap.put(java.io.Serializable.class, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(java.io.Serializable.class, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > + > desc = new AnyDescriptor(java.rmi.Remote.class, this); > - synchronized (desc) { > - classMap.put(java.rmi.Remote.class, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(java.rmi.Remote.class, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > + } > + > + org.omg.CORBA.ORB getORB() { > + return orb; > } > > public String getRepositoryID(Class type) { > @@ -143,8 +127,8 @@ public class TypeRepository { > } > > public TypeDescriptor getDescriptor(Class type) { > - logger.fine("Requesting type descriptor for class " + > type.getName()); > - TypeDescriptor desc = (TypeDescriptor) classMap.get(type); > + logger.fine("Requesting type descriptor for class " + > type.getName()); > + TypeDescriptor desc = classMap.get(type); > > if (desc != null) { > return desc.getSelf(); > @@ -154,33 +138,25 @@ public class TypeRepository { > && isIDLEntity(type)) { > IDLEntityDescriptor idlDesc = new IDLEntityDescriptor(type, > this); > desc = idlDesc; > - synchronized (desc) { > - classMap.put(type, desc); > - idlDesc.initIDL(); > - } > + classMap.put(type, desc); > + idlDesc.initIDL(); > } else if (java.lang.Throwable.class.isAssignableFrom(type)) { > desc = new ExceptionDescriptor(type, this); > - synchronized (desc) { > - classMap.put(type, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(type, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > > } else if (type.isArray()) { > desc = ArrayDescriptor.get(type, this); > - synchronized (desc) { > - classMap.put(type, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(type, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > } else if (!type.isInterface() > && java.io.Serializable.class.isAssignableFrom(type)) { > desc = new ValueDescriptor(type, this); > - synchronized (desc) { > - classMap.put(type, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(type, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > } else if (java.rmi.Remote.class.isAssignableFrom(type)) { > if (type.isInterface()) { > desc = new RemoteInterfaceDescriptor(type, this); > @@ -188,17 +164,13 @@ public class TypeRepository { > desc = new RemoteClassDescriptor(type, this); > } > > - synchronized (desc) { > - classMap.put(type, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(type, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > } else if (type.isPrimitive()) { > desc = getSimpleDescriptor(type); > - synchronized (desc) { > - classMap.put(type, desc); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(type, desc); > + repidMap.put(desc.getRepositoryID(), desc); > > } else if (Object.class.isAssignableFrom(type)) { > if (isAbstractInterface(type)) { > @@ -212,24 +184,18 @@ public class TypeRepository { > desc = new ValueDescriptor(type, this); > } > > - synchronized (desc) { > - classMap.put(type, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + classMap.put(type, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > > } else { > throw new RuntimeException("cannot handle class " + > type.getName()); > } > - > - logger.fine("Class " + type.getName() + " resolves to " + > desc.getClass().getName()); > + > + logger.fine("Class " + type.getName() + " resolves to " + > desc.getClass().getName()); > return desc; > } > > - /** > - * @param type > - * @return > - */ > private boolean isIDLEntity(Class type) { > Class[] supers = type.getInterfaces(); > > @@ -293,14 +259,14 @@ public class TypeRepository { > return false; > > Class[] interfaces = type.getInterfaces(); > - for (int i = 0; i < interfaces.length; i++) { > - if (!isAbstractInterface(interfaces[i])) > + for (Class anInterface : interfaces) { > + if (!isAbstractInterface(anInterface)) > return false; > } > > java.lang.reflect.Method[] methods = type.getDeclaredMethods(); > - for (int j = 0; j < methods.length; j++) { > - if (!isRemoteMethod(methods[j])) > + for (Method method : methods) { > + if (!isRemoteMethod(method)) > return false; > } > > @@ -310,8 +276,8 @@ public class TypeRepository { > boolean isRemoteMethod(java.lang.reflect.Method m) { > Class[] ex = m.getExceptionTypes(); > > - for (int i = 0; i < ex.length; i++) { > - if (ex[i].isAssignableFrom(REMOTE_EXCEPTION)) > + for (Class anEx : ex) { > + if (anEx.isAssignableFrom(REMOTE_EXCEPTION)) > return true; > } > > @@ -319,28 +285,32 @@ public class TypeRepository { > } > > /** > - * @param repid > + * @param clz (local) class we are interested in > + * @param repid repository id from GIOP input for the remote class > + * @param runtime way to look up the complete remote descriptor > * @return ValueDescriptor > + * @throws ClassNotFoundException something might go wrong. > */ > public ValueDescriptor getDescriptor(Class clz, String repid, > RunTime runtime) throws ClassNotFoundException { > - // ValueDescriptor desc = null; > - ValueDescriptor clzdesc = null; > + if (repid == null) { > + return (ValueDescriptor) getDescriptor(clz); > + } > + > + ValueDescriptor clzdesc = (ValueDescriptor) repidMap.get(repid); > + if (clzdesc != null) { > + return clzdesc; > + } > > if (clz != null) { > logger.fine("Requesting type descriptor for class " + > clz.getName() + " with repid " + repid); > - ValueDescriptor desc = (ValueDescriptor)classMap.get(clz); > - if (desc != null) { > - return desc; > - } > - // special handling for array value types. > + // special handling for array value types. > if (clz.isArray()) { > - desc = ArrayDescriptor.get(clz, this); > - synchronized (desc) { > - classMap.put(clz, desc); > - desc.init(); > - repidMap.put(desc.getRepositoryID(), desc); > - } > + //TODO don't we need to look up the FVD for the array > element? > + ValueDescriptor desc = ArrayDescriptor.get(clz, this); > + classMap.put(clz, desc); > + desc.init(); > + repidMap.put(desc.getRepositoryID(), desc); > return desc; > } > clzdesc = (ValueDescriptor) getDescriptor(clz); > @@ -349,33 +319,14 @@ public class TypeRepository { > if (repid.equals(localID)) { > return clzdesc; > } > - > - // we have a mismatch. We'll accept this if the class name > and the > - // serial version id are the same (ignoring the hash portion > of the id); > - String localClassName = localID.substring(0, > localID.indexOf(':')); > - String remoteClassName = repid.substring(0, > repid.indexOf(':')); > - > - String localSUID = > localID.substring(localID.lastIndexOf(':')); > - String remoteSUID = repid.substring(repid.lastIndexOf(':')); > - > - // compare the CORBA hash codes, and allow this to work > - if (localClassName.equals(remoteClassName) && > localSUID.equals(remoteSUID)) { > - logger.fine("mismatching repository ids accepted because > of matching name and SUID. local: " + clzdesc.getRepositoryID() + "; > remote: " + repid); > - return clzdesc; > - } > - > - logger.fine("mismatching repository ids. local: " > - + clzdesc.getRepositoryID() + "; remote: " + repid); > + //One might think that java serialization compatibility (same > SerialVersionUID) would mean corba > + //serialization compatibility. However, one implementation > might have a writeObject method and the > + //other implementation not. This is recorded only in the > isCustomMarshall of the source value > + //descriptor, so we have to fetch it to find out. A custom > marshall value has a couple extra bytes > + // and padding and these can't be reliably identified without > this remote info. cf YOKO-434. > } > > logger.fine("Requesting type descriptor for repid " + repid); > - if (repid != null) { > - clzdesc = (ValueDescriptor) repidMap.get(repid); > - if (clzdesc != null) { > - return clzdesc; > - } > - } > - > CodeBase codebase = CodeBaseHelper.narrow(runtime); > if (codebase == null) { > throw new MARSHAL("cannot locate RunTime CodeBase"); > @@ -385,7 +336,7 @@ public class TypeRepository { > > ValueDescriptor super_desc = null; > if (!"".equals(fvd.base_value)) { > - super_desc = getDescriptor(clz.getSuperclass(), > fvd.base_value, > + super_desc = getDescriptor(clz == null? null: > clz.getSuperclass(), fvd.base_value, > codebase); > } > > @@ -475,14 +426,14 @@ public class TypeRepository { > int len = current.length(); > match = false; > > - for (int i = 0; i < reservedPostfixes.length; i++) { > - if (current.endsWith(reservedPostfixes[i])) { > + for (ByteString reservedPostfixe : reservedPostfixes) { > + if (current.endsWith(reservedPostfixe)) { > ByteBuffer buf = new ByteBuffer(); > buf.append('_'); > buf.append(result); > result = buf.toByteString(); > > - int resultLen = reservedPostfixes[i].length(); > + int resultLen = reservedPostfixe.length(); > if (len > resultLen) > current = current.substring(0, len - resultLen); > else > @@ -498,7 +449,7 @@ public class TypeRepository { > return name; > } > > - static final java.util.Set keyWords = new java.util.HashSet(); > + static final java.util.Set keyWords = new > java.util.HashSet(); > > static final ByteString[] reservedPostfixes = new ByteString[] { > new ByteString("Helper"), new ByteString("Holder"), > @@ -519,8 +470,8 @@ public class TypeRepository { > "toString", "transient", "true", "try", "void", "volatile", > "wait", "while" }; > > - for (int i = 0; i < words.length; i++) { > - keyWords.add(new ByteString(words[i])); > + for (String word : words) { > + keyWords.add(new ByteString(word)); > } > } > > > Modified: > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java > URL: > http://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java?rev=1153313&r1=1153312&r2=1153313&view=diff > > ============================================================================== > --- > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java > (original) > +++ > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java > Wed Aug 3 00:42:03 2011 > @@ -818,7 +818,7 @@ public class ValueDescriptor extends Typ > > // System.out.println ("readValue "+getJavaClass()); > > - if (_write_object_method != null) { > + if (isCustomMarshalled()) { > > // read custom marshalling value header > byte streamFormatVersion = reader.readByte(); > @@ -967,7 +967,8 @@ public class ValueDescriptor extends Typ > getJavaClass().getName(), getRepositoryID(), false, // > is_abstract > isCustomMarshalled(), "", "1.0", > new org.omg.CORBA.OperationDescription[0], > - new org.omg.CORBA.AttributeDescription[0], > getValueMembers(), > + new org.omg.CORBA.AttributeDescription[0], > + getValueMembers(), > new org.omg.CORBA.Initializer[0], new String[0], new > String[0], > false, // is_truncatable > (_super_descriptor == null ? "" : _super_descriptor > > Modified: > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/util/ClassLoaderLocal.java > URL: > http://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/util/ClassLoaderLocal.java?rev=1153313&r1=1153312&r2=1153313&view=diff > > ============================================================================== > --- > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/util/ClassLoaderLocal.java > (original) > +++ > geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/util/ClassLoaderLocal.java > Wed Aug 3 00:42:03 2011 > @@ -86,7 +86,7 @@ public class ClassLoaderLocal { > > // table for tracking the CL to map relationships. We're > // using a WeakHashMap to prevent us pinning class loaders. > - static private WeakHashMap localMaps = new WeakHashMap(); > + static final private WeakHashMap localMaps = new WeakHashMap(); > > private ClassLocalMap getLoaderLocalMap() { > ClassLoader cl = Thread.currentThread().getContextClassLoader(); > > > --20cf30563e45984af104a992430e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi David,

A quick test with this new fix, but hit a classloading pro= blem like this:

Caused by: java.lang.LinkageError: loading constrain= t violation: loader "org/eclipse/osgi/internal/baseadaptor/DefaultClas= sLoader@3b0c3b0c" previously initiated loading for a different type wi= th name "org/omg/CORBA/ValueDefPackage/FullValueDescription" defi= ned by loader "com/ibm/oti/vm/BootstrapClassLoader@547d547d"
=A0=A0=A0 at org.apache.yoko.rmi.impl.TypeRepository.getDescriptor(TypeRepo= sitory.java:338)
=A0=A0=A0 at org.apache.yoko.rmi.impl.ValueHandlerImpl.= desc(ValueHandlerImpl.java:55)
=A0=A0=A0 at org.apache.yoko.rmi.impl.Val= ueHandlerImpl.readValue0(ValueHandlerImpl.java:91)
=A0=A0=A0 at org.apache.yoko.rmi.impl.ValueHandlerImpl.readValue(ValueHandl= erImpl.java:76)
=A0=A0=A0 at org.apache.yoko.orb.OB.ValueReader.readRMIV= alue(ValueReader.java:969)
=A0=A0=A0 at org.apache.yoko.orb.OB.ValueRead= er$FactoryCreationStrategy.create(ValueReader.java:299)
=A0=A0=A0 at org.apache.yoko.orb.OB.ValueReader.readValueAny(ValueReader.ja= va:1549)
=A0=A0=A0 at org.apache.yoko.orb.CORBA.InputStream.read_value(I= nputStream.java:1916)
=A0=A0=A0 at org.apache.yoko.orb.CORBA.Any.readVal= ue(Any.java:210)
=A0=A0=A0 at org.apache.yoko.orb.CORBA.Any.read_value(Any.java:505)
=A0= =A0=A0 at org.apache.yoko.orb.CORBA.InputStream.read_any(InputStream.java:1= 806)
=A0=A0=A0 at org.apache.yoko.rmi.impl.UtilImpl.readAny(UtilImpl.jav= a:309)
=A0=A0=A0 at org.apache.geronimo.corba.util.UtilDelegateImpl.read= Any(UtilDelegateImpl.java:111)
=A0=A0=A0 at javax.rmi.CORBA.Util.readAny(Util.java:95)
=A0=A0=A0 at org= .apache.yoko.rmi.impl.AnyDescriptor.read(AnyDescriptor.java:36)
=A0=A0= =A0 at org.apache.yoko.rmi.impl.MethodDescriptor.readResult(MethodDescripto= r.java:274)
=A0=A0=A0 at org.apache.yoko.rmi.impl.RMIStubHandler.invoke(= RMIStubHandler.java:79)
=A0=A0=A0 at org.apache.geronimo.yoko.RMIStubHandler.invoke(RMIStubHandler.= java:45)
=A0=A0=A0 ... 51 more

Forrest
On Wed, Aug 3, 2011 at 8:42 AM, <djencks@apache.org> wrote:
Author: djencks Date: Wed Aug =A03 00:42:03 2011
New Revision: 1153313

URL: http://svn.apache.org/viewvc?rev=3D1153313&view=3Drev=
Log:
YOKO-434 better implementation of figuring out if remote objects were custo= m marshalled

Modified:
=A0 =A0geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/= ValueReader.java
=A0 =A0geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi= /impl/FVDValueDescriptor.java
=A0 =A0geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi= /impl/TypeRepository.java
=A0 =A0geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi= /impl/ValueDescriptor.java
=A0 =A0geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi= /util/ClassLoaderLocal.java

Modified: geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/O= B/ValueReader.java
URL: http://svn.a= pache.org/viewvc/geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yok= o/orb/OB/ValueReader.java?rev=3D1153313&r1=3D1153312&r2=3D1153313&a= mp;view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
--- geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/Valu= eReader.java (original)
+++ geronimo/yoko/trunk/yoko-core/src/main/java/org/apache/yoko/orb/OB/Valu= eReader.java Wed Aug =A03 00:42:03 2011
@@ -71,7 +71,7 @@ final public class ValueReader {

=A0 =A0 =A0 =A0 String[] ids;

- =A0 =A0 =A0 =A0ChunkState state;
+ =A0 =A0 =A0 =A0final ChunkState state;

=A0 =A0 =A0 =A0 Header next; // Java only
=A0 =A0 =A0 =A0 String codebase; // Java only

Modified: geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/r= mi/impl/FVDValueDescriptor.java
URL: = http://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-impl/src/main/jav= a/org/apache/yoko/rmi/impl/FVDValueDescriptor.java?rev=3D1153313&r1=3D1= 153312&r2=3D1153313&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
--- geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/imp= l/FVDValueDescriptor.java (original)
+++ geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/imp= l/FVDValueDescriptor.java Wed Aug =A03 00:42:03 2011
@@ -20,6 +20,7 @@ package org.apache.yoko.rmi.impl;
=A0import org.omg.CORBA.AttributeDescription;
=A0import org.omg.CORBA.TypeCode;
=A0import org.omg.CORBA.ValueDefPackage.FullValueDescription;
+import org.omg.CORBA.ValueMember;

=A0/**
=A0* @author krab
@@ -44,24 +45,24 @@ public class FVDValueDescriptor extends
=A0 =A0 public void init() {
=A0 =A0 =A0 =A0 super.init();

- =A0 =A0 =A0 =A0// iverride custom loading
- =A0 =A0 =A0 =A0if (!fvd.is_custom) {
- =A0 =A0 =A0 =A0 =A0 =A0_read_object_method =3D null;
- =A0 =A0 =A0 =A0 =A0 =A0_write_object_method =3D null;
- =A0 =A0 =A0 =A0 =A0 =A0_is_externalizable =3D false;
- =A0 =A0 =A0 =A0}
-
- =A0 =A0 =A0 =A0AttributeDescription[] atts =3D fvd.attributes;
- =A0 =A0 =A0 =A0FieldDescriptor[] new_fields =3D new FieldDescriptor[atts.= length];
- =A0 =A0 =A0 =A0for (int i =3D 0; i < atts.length; i++) {
- =A0 =A0 =A0 =A0 =A0 =A0AttributeDescription att =3D atts[i];
- =A0 =A0 =A0 =A0 =A0 =A0new_fields[i] =3D findField(att);
+ =A0 =A0 =A0 =A0// don't override custom loading. Our local version co= uld work differently.
+// =A0 =A0 =A0 =A0if (!fvd.is_custom) {
+// =A0 =A0 =A0 =A0 =A0 =A0_read_object_method =3D null;
+// =A0 =A0 =A0 =A0 =A0 =A0_write_object_method =3D null;
+// =A0 =A0 =A0 =A0 =A0 =A0_is_externalizable =3D false;
+// =A0 =A0 =A0 =A0}
+
+ =A0 =A0 =A0 =A0ValueMember[] members =3D fvd.members;
+ =A0 =A0 =A0 =A0FieldDescriptor[] new_fields =3D new FieldDescriptor[membe= rs.length];
+ =A0 =A0 =A0 =A0for (int i =3D 0; i < members.length; i++) {
+ =A0 =A0 =A0 =A0 =A0 =A0ValueMember valueMember =3D members[i];
+ =A0 =A0 =A0 =A0 =A0 =A0new_fields[i] =3D findField(valueMember);
=A0 =A0 =A0 =A0 }

=A0 =A0 =A0 =A0 _fields =3D new_fields;
=A0 =A0 }

- =A0 =A0FieldDescriptor findField(AttributeDescription att) {
+ =A0 =A0FieldDescriptor findField(ValueMember valueMember) {
=A0 =A0 =A0 =A0 FieldDescriptor result =3D null;

=A0 =A0 =A0 =A0 for (Class c =3D getJavaClass(); c !=3D null; c =3D c.getS= uperclass()) {
@@ -75,7 +76,7 @@ public class FVDValueDescriptor extends
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }

=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 for (int i =3D 0; i < fds.length; i++) = {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (fds[i].getIDLName().equals(att.name)) {
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (fds[i].getIDLName().equals(val= ueMember.name)) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return fds[0];
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
@@ -103,7 +104,7 @@ public class FVDValueDescriptor extends
=A0 =A0 =A0*
=A0 =A0 =A0* @see org.apache.yoko.rmi.impl.TypeDescriptor#getTypeCode() =A0 =A0 =A0*/
- =A0 =A0TypeCode getTypeCode() {
+ =A0 =A0public TypeCode getTypeCode() {
=A0 =A0 =A0 =A0 return fvd.type;
=A0 =A0 }


Modified: geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/r= mi/impl/TypeRepository.java
URL: http= ://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/or= g/apache/yoko/rmi/impl/TypeRepository.java?rev=3D1153313&r1=3D1153312&a= mp;r2=3D1153313&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
--- geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/imp= l/TypeRepository.java (original)
+++ geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/imp= l/TypeRepository.java Wed Aug =A03 00:42:03 2011
@@ -18,6 +18,8 @@

=A0package org.apache.yoko.rmi.impl;

+import java.lang.reflect.Method;
+import java.util.concurrent.ConcurrentHashMap;
=A0import java.util.logging.Logger;
=A0import java.util.logging.Level;

@@ -37,76 +39,58 @@ public class TypeRepository {

=A0 =A0 org.omg.CORBA.ORB orb;

- =A0 =A0java.util.Map classMap =3D new java.util.HashMap();
+ =A0 =A0java.util.Map<Class, TypeDescriptor> classMap =3D new Concur= rentHashMap<Class, TypeDescriptor> ();

- =A0 =A0java.util.Map repidMap =3D new java.util.HashMap();
+ =A0 =A0java.util.Map<String, TypeDescriptor> repidMap =3D new Concu= rrentHashMap<String, TypeDescriptor>();

=A0 =A0 public TypeRepository(org.omg.CORBA.ORB orb) {
=A0 =A0 =A0 =A0 this.orb =3D orb;
- =A0 =A0 =A0 =A0init();
- =A0 =A0}
-
- =A0 =A0org.omg.CORBA.ORB getORB() {
- =A0 =A0 =A0 =A0return orb;
- =A0 =A0}
-
- =A0 =A0void init() {
=A0 =A0 =A0 =A0 TypeDescriptor desc;

=A0 =A0 =A0 =A0 desc =3D new AnyDescriptor(java.lang.Object.class, this);<= br> - =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0classMap.put(java.lang.Object.class, desc);
- =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
- =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0classMap.put(java.lang.Object.class, desc);
+ =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);

=A0 =A0 =A0 =A0 desc =3D new AnyDescriptor(java.lang.Object.class, this);<= br> - =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0classMap.put(java.lang.Object.class, desc);
- =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
- =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0classMap.put(java.lang.Object.class, desc);
+ =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);

=A0 =A0 =A0 =A0 desc =3D new StringDescriptor(this);
- =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0classMap.put(String.class, desc);
- =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
- =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0classMap.put(String.class, desc);
+ =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);

=A0 =A0 =A0 =A0 desc =3D new ClassDescriptor(this);
- =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0classMap.put(Class.class, desc);
- =A0 =A0 =A0 =A0 =A0 =A0classMap.put(javax.rmi.CORBA.ClassDesc.class, desc= );
- =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
- =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0classMap.put(Class.class, desc);
+ =A0 =A0 =A0 =A0classMap.put(javax.rmi.CORBA.ClassDesc.class, desc);
+ =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);

=A0 =A0 =A0 =A0 desc =3D new DateValueDescriptor(this);
- =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0classMap.put(java.util.Date.class, desc);
- =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
- =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0classMap.put(java.util.Date.class, desc);
+ =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
+
=A0 =A0 =A0 =A0 desc =3D new AnyDescriptor(java.io.Externalizable.class, t= his);
- =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0classMap.put(java.io.Externalizable.class, desc);<= br> - =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
- =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0classMap.put(java.io.Externalizable.class, desc);
+ =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);

=A0 =A0 =A0 =A0 desc =3D new AnyDescriptor(java.io.Serializable.class, thi= s);
- =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0classMap.put(java.io.Serializable.class, desc); - =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
- =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0classMap.put(java.io.Serializable.class, desc);
+ =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
+
=A0 =A0 =A0 =A0 desc =3D new AnyDescriptor(java.rmi.Remote.class, this); - =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0classMap.put(java.rmi.Remote.class, desc);
- =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
- =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0classMap.put(java.rmi.Remote.class, desc);
+ =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
+ =A0 =A0}
+
+ =A0 =A0org.omg.CORBA.ORB getORB() {
+ =A0 =A0 =A0 =A0return orb;
=A0 =A0 }

=A0 =A0 public String getRepositoryID(Class type) {
@@ -143,8 +127,8 @@ public class TypeRepository {
=A0 =A0 }

=A0 =A0 public TypeDescriptor getDescriptor(Class type) {
- =A0 =A0 =A0 =A0logger.fine("Requesting type descriptor for class &qu= ot; + type.getName());
- =A0 =A0 =A0 =A0TypeDescriptor desc =3D (TypeDescriptor) classMap.get(type= );
+ =A0 =A0 =A0 =A0logger.fine("Requesting type descriptor for class &qu= ot; + type.getName());
+ =A0 =A0 =A0 =A0TypeDescriptor desc =3D classMap.get(type);

=A0 =A0 =A0 =A0 if (desc !=3D null) {
=A0 =A0 =A0 =A0 =A0 =A0 return desc.getSelf();
@@ -154,33 +138,25 @@ public class TypeRepository {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 && isIDLEntity(type)) {
=A0 =A0 =A0 =A0 =A0 =A0 IDLEntityDescriptor idlDesc =3D new IDLEntityDescr= iptor(type, this);
=A0 =A0 =A0 =A0 =A0 =A0 desc =3D idlDesc;
- =A0 =A0 =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0idlDesc.initIDL();
- =A0 =A0 =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
+ =A0 =A0 =A0 =A0 =A0 =A0idlDesc.initIDL();
=A0 =A0 =A0 =A0 } else if (java.lang.Throwable.class.isAssignableFrom(type= )) {
=A0 =A0 =A0 =A0 =A0 =A0 desc =3D new ExceptionDescriptor(type, this);
- =A0 =A0 =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc)= ;
- =A0 =A0 =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
+ =A0 =A0 =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);

=A0 =A0 =A0 =A0 } else if (type.isArray()) {
=A0 =A0 =A0 =A0 =A0 =A0 desc =3D ArrayDescriptor.get(type, this);
- =A0 =A0 =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc)= ;
- =A0 =A0 =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
+ =A0 =A0 =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
=A0 =A0 =A0 =A0 } else if (!type.isInterface()
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 && java.io.Serializable.class.isAs= signableFrom(type)) {
=A0 =A0 =A0 =A0 =A0 =A0 desc =3D new ValueDescriptor(type, this);
- =A0 =A0 =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc)= ;
- =A0 =A0 =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
+ =A0 =A0 =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
=A0 =A0 =A0 =A0 } else if (java.rmi.Remote.class.isAssignableFrom(type)) {=
=A0 =A0 =A0 =A0 =A0 =A0 if (type.isInterface()) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D new RemoteInterfaceDescriptor(typ= e, this);
@@ -188,17 +164,13 @@ public class TypeRepository {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D new RemoteClassDescriptor(type, t= his);
=A0 =A0 =A0 =A0 =A0 =A0 }

- =A0 =A0 =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc)= ;
- =A0 =A0 =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
+ =A0 =A0 =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);
=A0 =A0 =A0 =A0 } else if (type.isPrimitive()) {
=A0 =A0 =A0 =A0 =A0 =A0 desc =3D getSimpleDescriptor(type);
- =A0 =A0 =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc)= ;
- =A0 =A0 =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
+ =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);

=A0 =A0 =A0 =A0 } else if (Object.class.isAssignableFrom(type)) {
=A0 =A0 =A0 =A0 =A0 =A0 if (isAbstractInterface(type)) {
@@ -212,24 +184,18 @@ public class TypeRepository {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 desc =3D new ValueDescriptor(type, this);<= br> =A0 =A0 =A0 =A0 =A0 =A0 }

- =A0 =A0 =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc)= ;
- =A0 =A0 =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0 =A0 =A0classMap.put(type, desc);
+ =A0 =A0 =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc);

=A0 =A0 =A0 =A0 } else {
=A0 =A0 =A0 =A0 =A0 =A0 throw new RuntimeException("cannot handle cla= ss " + type.getName());
=A0 =A0 =A0 =A0 }
-
- =A0 =A0 =A0 =A0logger.fine("Class " + type.getName() + " r= esolves to " + desc.getClass().getName());
+
+ =A0 =A0 =A0 =A0logger.fine("Class " + type.getName() + " r= esolves to " + desc.getClass().getName());
=A0 =A0 =A0 =A0 return desc;
=A0 =A0 }

- =A0 =A0/**
- =A0 =A0 * @param type
- =A0 =A0 * @return
- =A0 =A0 */
=A0 =A0 private boolean isIDLEntity(Class type) {
=A0 =A0 =A0 =A0 Class[] supers =3D type.getInterfaces();

@@ -293,14 +259,14 @@ public class TypeRepository {
=A0 =A0 =A0 =A0 =A0 =A0 return false;

=A0 =A0 =A0 =A0 Class[] interfaces =3D type.getInterfaces();
- =A0 =A0 =A0 =A0for (int i =3D 0; i < interfaces.length; i++) {
- =A0 =A0 =A0 =A0 =A0 =A0if (!isAbstractInterface(interfaces[i]))
+ =A0 =A0 =A0 =A0for (Class anInterface : interfaces) {
+ =A0 =A0 =A0 =A0 =A0 =A0if (!isAbstractInterface(anInterface))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return false;
=A0 =A0 =A0 =A0 }

=A0 =A0 =A0 =A0 java.lang.reflect.Method[] methods =3D type.getDeclaredMet= hods();
- =A0 =A0 =A0 =A0for (int j =3D 0; j < methods.length; j++) {
- =A0 =A0 =A0 =A0 =A0 =A0if (!isRemoteMethod(methods[j]))
+ =A0 =A0 =A0 =A0for (Method method : methods) {
+ =A0 =A0 =A0 =A0 =A0 =A0if (!isRemoteMethod(method))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return false;
=A0 =A0 =A0 =A0 }

@@ -310,8 +276,8 @@ public class TypeRepository {
=A0 =A0 boolean isRemoteMethod(java.lang.reflect.Method m) {
=A0 =A0 =A0 =A0 Class[] ex =3D m.getExceptionTypes();

- =A0 =A0 =A0 =A0for (int i =3D 0; i < ex.length; i++) {
- =A0 =A0 =A0 =A0 =A0 =A0if (ex[i].isAssignableFrom(REMOTE_EXCEPTION))
+ =A0 =A0 =A0 =A0for (Class anEx : ex) {
+ =A0 =A0 =A0 =A0 =A0 =A0if (anEx.isAssignableFrom(REMOTE_EXCEPTION))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return true;
=A0 =A0 =A0 =A0 }

@@ -319,28 +285,32 @@ public class TypeRepository {
=A0 =A0 }

=A0 =A0 /**
- =A0 =A0 * @param repid
+ =A0 =A0 * @param clz (local) class we are interested in
+ =A0 =A0 * @param repid =A0repository id from GIOP input for the remote cl= ass
+ =A0 =A0 * @param runtime way to look up the complete remote descriptor =A0 =A0 =A0* @return ValueDescriptor
+ =A0 =A0 * @throws ClassNotFoundException =A0something might go wrong.
=A0 =A0 =A0*/
=A0 =A0 public ValueDescriptor getDescriptor(Class clz, String repid,
=A0 =A0 =A0 =A0 =A0 =A0 RunTime runtime) throws ClassNotFoundException { - =A0 =A0 =A0 =A0// ValueDescriptor desc =3D null;
- =A0 =A0 =A0 =A0ValueDescriptor clzdesc =3D null;
+ =A0 =A0 =A0 =A0if (repid =3D=3D null) {
+ =A0 =A0 =A0 =A0 =A0 =A0return (ValueDescriptor) getDescriptor(clz);
+ =A0 =A0 =A0 =A0}
+
+ =A0 =A0 =A0 =A0ValueDescriptor clzdesc =3D (ValueDescriptor) repidMap.get= (repid);
+ =A0 =A0 =A0 =A0if (clzdesc !=3D null) {
+ =A0 =A0 =A0 =A0 =A0 =A0return clzdesc;
+ =A0 =A0 =A0 =A0}

=A0 =A0 =A0 =A0 if (clz !=3D null) {
=A0 =A0 =A0 =A0 =A0 =A0 logger.fine("Requesting type descriptor for c= lass " + clz.getName() + " with repid " + repid);
- =A0 =A0 =A0 =A0 =A0 =A0ValueDescriptor desc =3D (ValueDescriptor)classMap= .get(clz);
- =A0 =A0 =A0 =A0 =A0 =A0if (desc !=3D null) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return desc;
- =A0 =A0 =A0 =A0 =A0 =A0}
- =A0 =A0 =A0 =A0 =A0 =A0// special handling for array value types.
+ =A0 =A0 =A0 =A0 =A0 =A0// special handling for array value types.
=A0 =A0 =A0 =A0 =A0 =A0 if (clz.isArray()) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc =3D ArrayDescriptor.get(clz, this); - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0synchronized (desc) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0classMap.put(clz, desc);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc.init();
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(= ), desc);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0//TODO don't we need to look up the FV= D for the array element?
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ValueDescriptor desc =3D ArrayDescriptor.g= et(clz, this);
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0classMap.put(clz, desc);
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0desc.init();
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0repidMap.put(desc.getRepositoryID(), desc)= ;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return desc;
=A0 =A0 =A0 =A0 =A0 =A0 }
=A0 =A0 =A0 =A0 =A0 =A0 clzdesc =3D (ValueDescriptor) getDescriptor(clz);<= br> @@ -349,33 +319,14 @@ public class TypeRepository {
=A0 =A0 =A0 =A0 =A0 =A0 if (repid.equals(localID)) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return clzdesc;
=A0 =A0 =A0 =A0 =A0 =A0 }
-
- =A0 =A0 =A0 =A0 =A0 =A0// we have a mismatch. =A0We'll accept this if= the class name and the
- =A0 =A0 =A0 =A0 =A0 =A0// serial version id are the same (ignoring the ha= sh portion of the id);
- =A0 =A0 =A0 =A0 =A0 =A0String localClassName =3D localID.substring(0, loc= alID.indexOf(':'));
- =A0 =A0 =A0 =A0 =A0 =A0String remoteClassName =3D repid.substring(0, repi= d.indexOf(':'));
-
- =A0 =A0 =A0 =A0 =A0 =A0String localSUID =3D localID.substring(localID.las= tIndexOf(':'));
- =A0 =A0 =A0 =A0 =A0 =A0String remoteSUID =3D repid.substring(repid.lastIn= dexOf(':'));
-
- =A0 =A0 =A0 =A0 =A0 =A0// compare the CORBA hash codes, and allow this to= work
- =A0 =A0 =A0 =A0 =A0 =A0if (localClassName.equals(remoteClassName) &&a= mp; localSUID.equals(remoteSUID)) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0logger.fine("mismatching repository i= ds accepted because of matching name and SUID. =A0local: " + clzdesc.g= etRepositoryID() + "; remote: " + repid);
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return clzdesc;
- =A0 =A0 =A0 =A0 =A0 =A0}
-
- =A0 =A0 =A0 =A0 =A0 =A0logger.fine("mismatching repository ids. loca= l: "
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+ clzdesc.getRepositoryID() + &quo= t;; remote: " + repid);
+ =A0 =A0 =A0 =A0 =A0 =A0//One might think that java serialization compatib= ility (same SerialVersionUID) would mean corba
+ =A0 =A0 =A0 =A0 =A0 =A0//serialization compatibility. =A0However, one imp= lementation might have a writeObject method and the
+ =A0 =A0 =A0 =A0 =A0 =A0//other implementation not. =A0This is recorded on= ly in the isCustomMarshall of the source value
+ =A0 =A0 =A0 =A0 =A0 =A0//descriptor, so we have to fetch it to find out. = =A0A custom marshall value has a couple extra bytes
+ =A0 =A0 =A0 =A0 =A0 =A0// and padding and these can't be reliably ide= ntified without this remote info. =A0cf YOKO-434.
=A0 =A0 =A0 =A0 }

=A0 =A0 =A0 =A0 logger.fine("Requesting type descriptor for repid &qu= ot; + repid);
- =A0 =A0 =A0 =A0if (repid !=3D null) {
- =A0 =A0 =A0 =A0 =A0 =A0clzdesc =3D (ValueDescriptor) repidMap.get(repid);=
- =A0 =A0 =A0 =A0 =A0 =A0if (clzdesc !=3D null) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return clzdesc;
- =A0 =A0 =A0 =A0 =A0 =A0}
- =A0 =A0 =A0 =A0}
-
=A0 =A0 =A0 =A0 CodeBase codebase =3D CodeBaseHelper.narrow(runtime);
=A0 =A0 =A0 =A0 if (codebase =3D=3D null) {
=A0 =A0 =A0 =A0 =A0 =A0 throw new MARSHAL("cannot locate RunTime Code= Base");
@@ -385,7 +336,7 @@ public class TypeRepository {

=A0 =A0 =A0 =A0 ValueDescriptor super_desc =3D null;
=A0 =A0 =A0 =A0 if (!"".equals(fvd.base_value)) {
- =A0 =A0 =A0 =A0 =A0 =A0super_desc =3D getDescriptor(clz.getSuperclass(), = fvd.base_value,
+ =A0 =A0 =A0 =A0 =A0 =A0super_desc =3D getDescriptor(clz =3D=3D null? null= : clz.getSuperclass(), fvd.base_value,
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 codebase);
=A0 =A0 =A0 =A0 }

@@ -475,14 +426,14 @@ public class TypeRepository {
=A0 =A0 =A0 =A0 =A0 =A0 int len =3D current.length();
=A0 =A0 =A0 =A0 =A0 =A0 match =3D false;

- =A0 =A0 =A0 =A0 =A0 =A0for (int i =3D 0; i < reservedPostfixes.length;= i++) {
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (current.endsWith(reservedPostfixes[i])= ) {
+ =A0 =A0 =A0 =A0 =A0 =A0for (ByteString reservedPostfixe : reservedPostfix= es) {
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (current.endsWith(reservedPostfixe)) {<= br> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ByteBuffer buf =3D new ByteBuffer(= );
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 buf.append('_');
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 buf.append(result);
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 result =3D buf.toByteString();

- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0int resultLen =3D reservedPostfixe= s[i].length();
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0int resultLen =3D reservedPostfixe= .length();
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (len > resultLen)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 current =3D current.substr= ing(0, len - resultLen);
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else
@@ -498,7 +449,7 @@ public class TypeRepository {
=A0 =A0 =A0 =A0 return name;
=A0 =A0 }

- =A0 =A0static final java.util.Set keyWords =3D new java.util.HashSet(); + =A0 =A0static final java.util.Set<ByteString> keyWords =3D new java= .util.HashSet<ByteString>();

=A0 =A0 static final ByteString[] reservedPostfixes =3D new ByteString[] {=
=A0 =A0 =A0 =A0 =A0 =A0 new ByteString("Helper"), new ByteString= ("Holder"),
@@ -519,8 +470,8 @@ public class TypeRepository {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "toString", "transient"= ;, "true", "try", "void", "volatile"= ;,
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "wait", "while" };

- =A0 =A0 =A0 =A0for (int i =3D 0; i < words.length; i++) {
- =A0 =A0 =A0 =A0 =A0 =A0keyWords.add(new ByteString(words[i]));
+ =A0 =A0 =A0 =A0for (String word : words) {
+ =A0 =A0 =A0 =A0 =A0 =A0keyWords.add(new ByteString(word));
=A0 =A0 =A0 =A0 }
=A0 =A0 }


Modified: geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/r= mi/impl/ValueDescriptor.java
URL: htt= p://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/o= rg/apache/yoko/rmi/impl/ValueDescriptor.java?rev=3D1153313&r1=3D1153312= &r2=3D1153313&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
--- geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/imp= l/ValueDescriptor.java (original)
+++ geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/imp= l/ValueDescriptor.java Wed Aug =A03 00:42:03 2011
@@ -818,7 +818,7 @@ public class ValueDescriptor extends Typ

=A0 =A0 =A0 =A0 // System.out.println ("readValue "+getJavaClass= ());

- =A0 =A0 =A0 =A0if (_write_object_method !=3D null) {
+ =A0 =A0 =A0 =A0if (isCustomMarshalled()) {

=A0 =A0 =A0 =A0 =A0 =A0 // read custom marshalling value header
=A0 =A0 =A0 =A0 =A0 =A0 byte streamFormatVersion =3D reader.readByte(); @@ -967,7 +967,8 @@ public class ValueDescriptor extends Typ
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 getJavaClass().getName(), getRepositoryID(= ), false, // is_abstract
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 isCustomMarshalled(), "", "= 1.0",
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 new org.omg.CORBA.OperationDescription[0],=
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0new org.omg.CORBA.AttributeDescription[0],= getValueMembers(),
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0new org.omg.CORBA.AttributeDescription[0],=
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0getValueMembers(),
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 new org.omg.CORBA.Initializer[0], new Stri= ng[0], new String[0],
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 false, // is_truncatable
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (_super_descriptor =3D=3D null ? "&qu= ot; : _super_descriptor

Modified: geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/r= mi/util/ClassLoaderLocal.java
URL: ht= tp://svn.apache.org/viewvc/geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/= org/apache/yoko/rmi/util/ClassLoaderLocal.java?rev=3D1153313&r1=3D11533= 12&r2=3D1153313&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
--- geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/uti= l/ClassLoaderLocal.java (original)
+++ geronimo/yoko/trunk/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/uti= l/ClassLoaderLocal.java Wed Aug =A03 00:42:03 2011
@@ -86,7 +86,7 @@ public class ClassLoaderLocal {

=A0 =A0 // table for tracking the CL to map relationships. =A0We're =A0 =A0 // using a WeakHashMap to prevent us pinning class loaders.
- =A0 =A0static private WeakHashMap localMaps =3D new WeakHashMap();
+ =A0 =A0static final private WeakHashMap localMaps =3D new WeakHashMap();<= br>
=A0 =A0 private ClassLocalMap getLoaderLocalMap() {
=A0 =A0 =A0 =A0 ClassLoader cl =3D Thread.currentThread().getContextClassL= oader();



--20cf30563e45984af104a992430e--