I must admit, being new to FDS/Java, can you give any examples of specific use cases where we would need to implement Serializable?

We are using FDS with RTMP (& possibly messaging in the future). We are persisting everything with Hibernate/MySQL.

From what I can tell we don't need it, but like I said, I am new to this.

Thanks!

- Kevin


On May 9, 2007, at 10:44 AM, Peter Farland wrote:


FDS 2 does not require types to implement Serializable.

The value of serialVersionUID really should be generated using the serialver command line tool that ships with the JDK... which is a pain to do each time you add a new class. If you don't need them to be Serializable, then I suggest not implementing this interface.

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin
Sent: Wednesday, May 09, 2007 9:15 AM
To: [email protected]
Subject: Re: [flexcoders] is Serializable needed?

I guess it can't hurt to have them Serializable. I'll add the static final.


Thanks, Kevin



On May 9, 2007, at 9:02 AM, Sean Sell wrote:


I don't don't know about hibernate but I'm pushing some object onto a JMS topic and they need to be serialized.

to get rid of your error add to your class:

public static final long serialVersionUID = 1L;


you only need to update the version ID with changes if you actually store the serialized version and want make sure your not loading and old one.

----- Original Message ----
From: Kevin <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, May 9, 2007 8:47:13 AM
Subject: [flexcoders] is Serializable needed?

do java classes need to implement java.io.Serializabl e for use with FDS/Hibernate?


If not is there another reason to do this? Eclipse keeps giving me warnings whenever I implement this?

"The serializable class AddressVO does not declare a static final serialVersionUID field of type long"

Thanks, Kevin


Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food Drink Q&A.






Reply via email to