I'm wondering if you could solve your problem by implementing read/writeObject 
as follows:


  | private void writeObject(java.io.ObjectOutputStream out)
  |      throws IOException
  | {
  |    out.writeObject(itemCode);
  |    out.writeObject(description);
  |    out.writeBoolean(defaultItem);
  |    out.writeObject(new ArrayList(parentItemCodeList));
  |    out.writeObject(new ArrayList(amenitiesList));
  |    out.writeBoolean(hasSuite);
  |    out.writeBoolean(hasConcierge);
  |    out.writeInt(maxGuest);
  | }
  | 
  | private void readObject(java.io.ObjectInputStream in)
  |      throws IOException, ClassNotFoundException
  | {
  |    itemCode = (String) in.readObject();
  |    description = (String) in.readObject();
  |    defaultItem = in.readBoolean();
  |    parentItemCodeList = (ArrayList) in.readObject();
  |    amenitiesList = (ArrayList) in.readObject();
  |    hasSuite = in.readBoolean();
  |    hasConcierge = in.readBoolean();
  |    maxGuest = in.readInt();
  | }
  | 

Your problem is the List implementation we use when the POJO is in the cache 
can't be serialized.  The above writeObject solves this by writing a new 
ArrayList whose contents are the elements in the cache.

Note that if the objects in parentItemCodeList and amenitiesList are themselves 
complex objects that contain collections, the same technique would need to be 
used for their classes.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3924078#3924078

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3924078


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to