The files jacorb.jar and idl.jar in this directory are a patched version of JacORB 2.2.4. The patched libraries identify themselves as JacORB V 2.2.4 (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.4+ source tree, with the following commands: cvs -d :pserver:anonymous@www.jacorb.org/cvsroot/jacorb checkout -r RELEASE_2_2_5_BRANCH JacORB cd JacORB cvs update -rRELEASE_2_2_4 src/org/jacorb/idl/build.xml (2) Apply the patchfile below: Index: src/org/jacorb/orb/CDROutputStream.java =================================================================== RCS file: /cvsroot/jacorb/JacORB/src/org/jacorb/orb/CDROutputStream.java,v retrieving revision 1.106 diff -u -r1.106 CDROutputStream.java --- src/org/jacorb/orb/CDROutputStream.java 17 May 2006 13:14:37 -0000 1.106 +++ src/org/jacorb/orb/CDROutputStream.java 4 Aug 2006 17:17:13 -0000 @@ -851,9 +851,10 @@ throw new MARSHAL("Null References"); } - // size indicator ulong + length in chars( i.e. bytes for type char) - // incl. terminating NUL char - int size = 4 + s.length() + 1; + // size leaves room for ulong, plus the string itself (3 bytes + // per char in the string might be needed in the case of UTF-8 + // encoding), plus the terminating NUL char + int size = 4 + 3 * s.length() + 1; check( size, 4 ); int sizepos = pos; @@ -2543,20 +2544,9 @@ } else { - // go to the beginning of the chunk and write the size tag - - // check(7, 4); // DO NOT align to a 4-byte boundary - - int current_pos = pos; - int current_idx = index; - - pos = chunk_size_tag_pos; - index = chunk_size_tag_index; - write_long( current_pos - chunk_octets_pos ); - - pos = current_pos; - index = current_idx; - + rewrite_long(chunk_size_tag_pos, + chunk_size_tag_index, + pos - chunk_octets_pos); } chunk_size_tag_pos = -1; // no chunk is currently open } @@ -2573,6 +2563,26 @@ // remember starting position of chunk data chunk_octets_pos = pos; + } + + /** + * Writes a CORBA long value to (write_pos, write_index) without clearing + * the buffer padding. In the case of a non-sequential write, clearing + * buffer positions after the data just written is likely to erase data + * previously written. + */ + private final void rewrite_long(int write_pos, + int write_index, + final int value) + { + final int align = 4; + int remainder = align - (write_index % align); + if (remainder != align) + { + write_index += remainder; + write_pos += remainder; + } + _write4int(buffer, write_pos, value); } /** Index: src/org/jacorb/util/Version.java =================================================================== RCS file: /cvsroot/jacorb/JacORB/src/org/jacorb/util/Version.java,v retrieving revision 1.29 diff -u -r1.29 Version.java --- src/org/jacorb/util/Version.java 10 Dec 2005 15:56:10 -0000 1.29 +++ src/org/jacorb/util/Version.java 4 Aug 2006 17:17:13 -0000 @@ -28,7 +28,7 @@ */ public final class Version { - public static final String version = "2.2.3"; - public static final String date = "10-Dec-2005"; + public static final String version = "2.2.4 (JBoss patch 1)"; + public static final String date = "04-Aug-2006"; public static final String longVersion = version + ", " + date; }