The files jacorb.jar and idl.jar in this directory are a patched version of JacORB 2.2.2. The patched libraries identify themselves as JacORB V 2.2.2 (JBoss patch 1), www.jacorb.org Instructions for generating these files are included below. Kudos to the JacORB team, for this great open-source ORB. Special thanks to: Gerald Brose, for creating JacORB Andre Spiegel, for his work on OBV in JacORB Francisco --------------------------------------------------------------------------- *** How to generate the jacorb.jar and idl.jar files in this directory *** (1) Obtain a JacORB 2.2.1 source tree, with the following command: cvs -d :pserver:anonymous@www.jacorb.org/cvsroot/jacorb checkout -r RELEASE_2_2_2 JacORB (2) Apply the patchfile below, then generate JacORB as usual. Index: src/org/jacorb//orb/CDROutputStream.java =================================================================== RCS file: /cvsroot/jacorb/JacORB/src/org/jacorb/orb/CDROutputStream.java,v retrieving revision 1.100 diff -u -r1.100 CDROutputStream.java --- src/org/jacorb//orb/CDROutputStream.java 23 Apr 2005 13:07:29 -0000 1.100 +++ src/org/jacorb//orb/CDROutputStream.java 26 Jun 2005 20:47:56 -0000 @@ -2376,7 +2376,10 @@ try { Class helperClass = - cls.getClassLoader().loadClass(helperClassName); + (cls.getClassLoader() != null) + ? cls.getClassLoader().loadClass(helperClassName) + : ObjectUtil.classForName(helperClassName); + Class[] paramTypes = { org.omg.CORBA.portable.OutputStream.class, cls }; writeMethod = helperClass.getMethod("write", paramTypes); Index: src/org/jacorb//orb/Delegate.java =================================================================== RCS file: /cvsroot/jacorb/JacORB/src/org/jacorb/orb/Delegate.java,v retrieving revision 1.111 diff -u -r1.111 Delegate.java --- src/org/jacorb//orb/Delegate.java 22 Apr 2005 13:19:48 -0000 1.111 +++ src/org/jacorb//orb/Delegate.java 26 Jun 2005 20:47:57 -0000 @@ -1200,49 +1200,60 @@ } else { - // Try to avoid remote call - is it a derived type? - try + // The check below avoids trying to load a stub for CORBA.Object. + // (It would be faster to check that ids.length > 1, but Sun's + // CosNaming JNDI provider calls _is_a() on some weird ObjectImpl + // instances whose _ids() method returns an array of length two, + // containing two Strings equal to "IDL:omg.org/CORBA/Object:1.0".) + if (!ids[0].equals("IDL:omg.org/CORBA/Object:1.0")) { - // Retrieve the local stub for the object in question. Then call the _ids method - // and see if any match the logical_type_id otherwise fall back to remote. + // Try to avoid remote call - is it a derived type? + try + { + // Retrieve the local stub for the object in question. Then call the _ids method + // and see if any match the logical_type_id otherwise fall back to remote. - String classname = RepositoryID.className( ids[0], "_Stub", null ); + String classname = RepositoryID.className( ids[0], "_Stub", null ); - int lastDot = classname.lastIndexOf( '.' ); - StringBuffer scn = new StringBuffer( classname.substring( 0, lastDot + 1) ); - scn.append( '_' ); - scn.append( classname.substring( lastDot + 1 ) ); + int lastDot = classname.lastIndexOf( '.' ); + StringBuffer scn = new StringBuffer( classname.substring( 0, lastDot + 1) ); + scn.append( '_' ); + scn.append( classname.substring( lastDot + 1 ) ); - // This will only work if there is a correspondence between the Java class - // name and the Repository ID. If prefixes have been using then this mapping - // may have been lost. + // This will only work if there is a correspondence between the Java class + // name and the Repository ID. If prefixes have been using then this mapping + // may have been lost. - // First, search with stub name - // if not found, try with the 'org.omg.stub' prefix to support package - // with javax prefix - Class stub=null; - try { - stub = ObjectUtil.classForName( scn.toString()); - } catch (ClassNotFoundException e) { - stub = ObjectUtil.classForName("org.omg.stub."+scn.toString()); - } + // First, search with stub name + // if not found, try with the 'org.omg.stub' prefix to support package + // with javax prefix + Class stub=null; + try + { + stub = ObjectUtil.classForName( scn.toString()); + } + catch (ClassNotFoundException e) + { + stub = ObjectUtil.classForName("org.omg.stub."+scn.toString()); + } - Method idm = stub.getMethod ( "_ids", (Class[]) null ); - String newids[] = (String[] )idm.invoke( stub.newInstance(), (java.lang.Object[]) null ); + Method idm = stub.getMethod ( "_ids", (Class[]) null ); + String newids[] = (String[] )idm.invoke( stub.newInstance(), (java.lang.Object[]) null ); - for ( int i = 0; i < newids.length ; i++ ) - { - if (newids[i].equals( logical_type_id ) ) + for ( int i = 0; i < newids.length ; i++ ) { - return true; + if (newids[i].equals( logical_type_id ) ) + { + return true; + } } } - } - // If it fails fall back to a remote call. - catch (Throwable e) - { - if (logger.isDebugEnabled()) - logger.debug("trying is_a remotely"); + // If it fails fall back to a remote call. + catch (Throwable e) + { + if (logger.isDebugEnabled()) + logger.debug("trying is_a remotely"); + } } org.omg.CORBA.portable.OutputStream os; Index: src/org/jacorb//util/Version.java =================================================================== RCS file: /cvsroot/jacorb/JacORB/src/org/jacorb/util/Version.java,v retrieving revision 1.28 diff -u -r1.28 Version.java --- src/org/jacorb//util/Version.java 1 Jun 2005 12:12:50 -0000 1.28 +++ src/org/jacorb//util/Version.java 26 Jun 2005 20:47:57 -0000 @@ -28,7 +28,7 @@ */ public final class Version { - public static final String version = "2.2.2"; - public static final String date = "1-Jun-2005"; + public static final String version = "2.2.2 (JBoss patch 1)"; + public static final String date = "25-Jun-2005"; public static final String longVersion = version + ", " + date; }