[Biojava-l] SimpleSequenceHolder, FuzzyLocation and serialisation

Schreiber, Mark mark.schreiber@agresearch.co.nz
Fri, 31 May 2002 09:50:39 +1200


Hi -

When improving serialization support at the Biojava bootcamp we where
reluctant to mark the AbstractFeatureHolder as Serializable as we
weren't confident of the behaivour hence the private inner class of
SimpleSequence, infact there is probably no reason whey
SimpleFeatureHolder cannot be marked as Serializable.

As a general design principle I seem to remember that its better if you
don't have to Serialize inner classes, I think the idea is ideally they
could be reconstructed from information read in from the binary stream.
Having said that I think the person who recommended it had a very
idaelistic idea of inner classes :-\

Feel free to go ahead and serialize whatever you can. You should have a
look at some of the Junit tests that have been set up to test
serialization to get an idea of some of the complexities. Note that one
of the Distribution serialization tests seems to fail at the moment for
unknown reasons (something to do with the OrderNDistribution I think).

I think that increased Serialization support will make BioJava more
attractive as an Enterprise type solution (allowing RMI etc).

- Mark

> -----Original Message-----
> From: Mr. A.R.N. Tivey [mailto:ativey@hgmp.mrc.ac.uk] 
> Sent: Friday, 31 May 2002 3:24 a.m.
> To: biojava-l@biojava.org
> Subject: [Biojava-l] SimpleSequenceHolder, FuzzyLocation and 
> serialisation
> 
> 
> Hi,
> 
> Are there any objections to marking 
> org.biojava.bio.seq.SimpleFeatureHolder as Serializable? I 
> can't foresee any problems. (I note that SimpleSequence has a 
> private subclass of SimpleFeatureHolder for this very purpose)
> 
> On a similar topic, FuzzyLocation is marked Serializable but 
> it's inner classes aren't. Any objection marking them too, 
> with suitable
> writeReplace() and readResolve() methods?
> 
> Adrian
> 
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l@biojava.org 
> http://biojava.org/mailman/listinfo/biojava-l
> 
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================