开发者

When do I have to make entities serializable when using EJB3?

I use all of my entities Serializable. However I think it is okay to use without serializable.

But what are the advantages of making an entity Serializable?开发者_运维问答 When do we really have to serialize an entity / or when do not?


From the Java EE 6 Tutorial (which is quoting JSR-317 §2.1):

Requirements for Entity Classes

...
If an entity instance is passed by value as a detached object, such as through a session bean’s remote business interface, the class must implement the Serializable interface.
...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜