franleplant <franleplant(a)gmail.com> wrote, in response to Vineet Reynolds:
Thanks for your answer.
I wont be using Serializable in my classes, I will write you later to let you know how it
went.
Im also interested in send you the link to the project that Im making when its done, so
maybe you can use it as another Example of the greatness of the JBoss stuck.
Fran
IP address: 201.231.7.112
Link to comment:
http://redirect.disqus.com/url?url=http%3A%2F%2Fjboss.org%2Fjdf%2Fexample...
Vineet Reynolds wrote:
If you want a general answer, I would recommend using Serializable for JPA entities that
also assume the role of DTOs. So you could safely transport them across layers, especially
from the business to the view layer. Note that in the current architecture, there
isn't a need to use Serializable, primarily because we use Jackson (used in RESTEasy)
to serialize JPA entities to JSON; the Jackson data binding model ignores Serializable.
As to why you notice Serializable being used in Show, that's down to the history of
the class in this application.
The same answer goes for serialVersionUID. If your entities are not serialized using the
Java native serialization mechanism, you could suppress the warning. You'd need this
when you use remote EJBs etc. and transport JPA entities over the wire ...
-----
Options: You can moderate through email. Respond in the body with "Delete".
Reply with "Like" to like this comment, or respond with anything else to approve
this comment and post your message as a reply comment.
Or use the moderate panel:
http://jdf.disqus.com/admin/moderate/#/pending
Stop receiving notifications when new comments are posted:
http://disqus.com/account/#notifications