It's too bad there's no obvious way to distinguish the 2 use cases when doing the
serialization. 2 use cases being 1) serializing as part of a JBC replication (like in the
other forum thread that led to this issue) and 2) other types of serialization like I
described above. With the first, I agree, it's easy for the user to get confused and
expect some relationship will survive the serialization. Giving them help is not bad. For
the second case, if they think that somehow a relationship will survive by magic when a
remote cache isn't even involved, well, they're just not thinking at all; I
don't feel any strong need to "help" in such a case.
Hmm -- instead of throwing an exception, why not log a WARN and then do the writeReplace?
The category logging the WARN is the proxy class, so if people write code where
they're doing this on purpose and understand what they're doing, they can just
limit the proxy class category to ERROR.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983264#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...