Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

why object implements serializable when use jpa, cache, session ... etc

$
0
0

https://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html

When and why JPA entities should implement the Serializable interface?

According to the Java specification, to write an object in jvm to a file, etc., it is said that serializable must be implemented.

However, this is clearly an incorrect explanation. So far, I have never implemented serializable when putting data into redis cache, session, or RDB.

Even if you don't implement serializable, it is normally written outside the JVM memory, such as a file, so I don't understand why you need to implement this. As I said before, I've never used serializable and it's been working fine so far.


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>