Some useful Java Class Structures
Everyone know that Corba is capable to read/write Java objects from the J2ee servers. However, it is not easy to figure out the internal structure of each Java class. The Corba spec doesn't point out how to create value objects in Corba to access the corresponding J2ee native classes. After going through a long time to check out the internal structures of the IIOP streaming data come from J2ee servers, serveral important Java class structures are listed out as follow. The reference implementation may be found in the corresponding TomORB soruce.
Class Name Internal Structure Detail
java.util.ArrayList
1. rmi version (corba octet = 0x01)
2. rmi data (corba octet = 0x01)
3. member size (corba long)
4. bucket size (corba long = 0x10)
5. elements stored in ArrayList.  
   Note : Each element should be read by read_abstract_interface() or written 
          by write_abstract_interface().  The date type of each element
          must be org.omg.CORBA.Object
          
   Reference Implemetation : J2ee.Java.Util.ArrayListImpl
java.util.Vector
1. rmi version (corba octet = 0x01)
2. rmi data (corba octet = 0x01)
3. capacity (corba long)
4. no of elements stored in Vector (corba long)
5. elements stored in Vector.  
   Note : Each element should be read by read_value() or written by
          write_value().  The data type of each element must be 
          org.omg.CORBA.Any.

   Reference Implemetation : J2ee.Java.Util.VectorImpl
java.util.Date
1. rmi version (corba octet = 0x01)
2. rmi data (corba octet = 0x01)
3. offset in milliseconds (corba long long)

   Reference Implemetation : J2ee.Java.Util.DateImpl
java.util.HashMap
1. rmi version (corba octet = 0x01) 
2. rmi data (corba octet = 0x01) 
3. loadFactor (corba float) 
4. treshold (corba long) 
5. capacity (corba long) 
6. number of elements (corba long) 
7. elements stored in HashMap. 
   Note : Each element contains a key and the corresponding value.
   They should be read by read_abstract() or written by write_abstract() 
   defined in org.omg.CORBA.DataInputStream.
   
   Reference Implemetation : J2ee.Java.Util.HashMapImpl
java.util.HashSet
1. rmi version (corba octet = 0x01) 
2. rmi data (corba octet = 0x01) 
3. capacity (corba long) 
4. loadFactor (corba float) 
5. number of elements (corba long) 
7. elements stored in HashSet. 
   Note : Each element should be read by read_abstract() 
   or written by write_abstract() defined in 
   org.omg.CORBA.DataInputStream.
   
   Reference Implemetation : J2ee.Java.Util.HashSetImpl
java.util.Hashtable
1. rmi version (corba octet = 0x01) 
2. rmi data (corba octet = 0x01) 
3. loadFactor (corba float) 
4. treshold (corba long) 
5. capacity (corba long) 
6. number of elements (corba long) 
7. elements stored in HashMap. 
   Note : Each element contains a key and the corresponding value.
   They should be read by read_abstract() or written by write_abstract() 
   defined in org.omg.CORBA.DataInputStream.
   
   Reference Implemetation : J2ee.Java.Util.HashtableImpl
java.util.LinkedList
1. rmi version (corba octet = 0x01) 
2. rmi data (corba octet = 0x01) 
3. number of elements (corba long) 
4. elements stored in LinkedList. 
   Note : Each element should be read by read_abstract() or 
   written by write_abstract() defined in 
   org.omg.CORBA.DataInputStream.
   
   Reference Implemetation : J2ee.Java.Util.LinkedListImpl
java.util.Properties
1. rmi version (corba octet = 0x01) 
2. rmi data (corba octet = 0x01) 
3. loadFactor (corba float) 
4. treshold (corba long) 
5. capacity (corba long) 
6. number of elements (corba long) 
7. elements stored in HashMap. 
   Note : Each element contains a key and the corresponding value.
   They should be read by read_abstract() or written by write_abstract() 
   defined in org.omg.CORBA.DataInputStream.
   
   Reference Implemetation : J2ee.Java.Util.PropertiesImpl
java.util.Stack
1. rmi version (corba octet = 0x01)
2. rmi data (corba octet = 0x01)
3. capacity increment factor (corba long)
4. no of elements stored in Vector (corba long)
5. elements stored in Vector.  
   Note : Each element should be read by read_value() or written by
          write_value().  The data type of each element must be 
          org.omg.CORBA.Any.

   Reference Implemetation : J2ee.Java.Util.StackImpl
java.sql.Date
1. rmi version (corba octet = 0x01)
2. rmi data (corba octet = 0x01)
3. offset in milliseconds (corba long long)

   Reference Implemetation : J2ee.Java.Sql.DateImpl
java.sql.Time
1. rmi version (corba octet = 0x01)
2. rmi data (corba octet = 0x01)
3. offset in milliseconds (corba long long)

   Reference Implemetation : J2ee.Java.Sql.TimeImpl
java.sql.Timestamp
1. rmi version (corba octet = 0x01)
2. rmi data (corba octet = 0x01)
3. offset in milliseconds (corba long long)
4. nano seconds (corba long)

   Reference Implemetation : J2ee.Java.Sql.TimestampImpl
Customized Class From Borland
com.inprise.ejb.iterator.CustomVector
1. rmi version (corba octet = 0x01)
2. rmi data (corba octet = 0x01)
3. boolean value (corba boolean)
4. no of elements stored in CustomVector (corba long)
5. capacity increment (corba long)
5. elements stored in CustomVector.  
   Note : Each element should be read by read_object() or written by
          write_object().  The data type of each element must be 
          org.omg.CORBA.Object.

   Reference Implemetation : J2ee.Borland.CustomVectorImpl
Customized Class From Borland
com.inprise.ejb.util.VectorEnumeration
1. rmi version (corba octet = 0x01)
2. rmi data (corba octet = 0x01)
3. Value Objct - should be read by read_value() or written by
          write_value().

   Reference Implemetation : J2ee.Borland.VectorEnumerationImpl