Bugs item #510397, was opened at 2002-01-29 14:36
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=510397&group_id=22866

Category: JBossServer
Group: v2.4 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: William A. Kaufman (wkaufman)
Assigned to: Nobody/Anonymous (nobody)
Summary: PrimaryKey Classes and Marshalling 

Initial Comment:
The hashCode and equals methods implemented by 
PrimaryKey classes are not used by JBoss (at least by 
default - see the CacheKey class). Instead, the 
hashCode and equals of the MarshalledObject 
constructed from the PK is used.

This is fine if the serialization is done correctly 
(ie readObject() has been implemented right). 
Unfortunately, the BigInteger implementation in 
jdk1.3.1 has a number of fields that either should 
have been declared transient, or ... (your solution 
here). The upshot is if you use BigInteger (or 
BigDecimal - it has a BigInteger inside it) as your PK 
class or as part of your PK class, you are not 
guaranteed that the MarshalledObject hashcode will be 
unique. This is bad news for the entity caching in 
JBoss 2.4.4 (haven't looked at 3.0, but I assume it's 
the same).

Attached is a simple test to illustrate the problem.

This problem bit us pretty hard. A bug report's been 
filed with Sun.



----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=510397&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to