-
1. Re: CMP2.0 and storing objects problem
dsundstrom Dec 5, 2001 4:44 PM (in response to rune)Can you send me a small test case? I'll try to look into this.
-
2. Re: CMP2.0 and storing objects problem
rgrey Aug 21, 2002 10:22 AM (in response to rune)Was this problem ever resolved? I am using an older version of JBoss (2.X) and wondered if an upgrade would resolve this. Thanks
-
3. Re: CMP2.0 and storing objects problem
rgrey Aug 21, 2002 10:55 AM (in response to rune)Please ignore my other post, I think the answer to this dilemma lies in your getter. When an ArrayList is initially returned from the EJB it is complete because it has come fresh from the database. However, Java dynamic collections like ArrayLists and Vectors are only references (as far as I can tell). In other words, when the receiving client destroys the ArrayList it is also destroyed in the EJB. I resolved this problem with code like this:
public ArrayList getArrayList() {
ArrayList temp = (ArrayList) arrayList.clone();
return temp;
}
Please correct me if this is an incorrect resolution to your problem.