dcsimg
Error with Iterator class on Network
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vijay_Kumar
Posted On:   Friday, August 22, 2003 08:25 AM

I'm returning an Iteartor from the Session EJB to the client on which i'm getting an Class Cast Exception is there any serialization problem with Iterators on network...
pls respond imm.,

Thanks in advance....

Re: Error with Iterator class on Network

Posted By:   Christopher_Koenigsberg  
Posted On:   Friday, August 22, 2003 02:05 PM

"Iterator" is an interface, not a class..... so I think you would need to serialize and de-serialize based on the underlying implementation class, right?



Also in the Javadoc there is a warning, under the "remove()" method:

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method


(would serializing and deserializing count as "modified", per this warning? could the underlying thing be re-ordered, shuffled, compacted, etc. possibly?)

About | Sitemap | Contact