What is the difference between the two if any?
Should one or both be used on an entity?
For entity there's practically no difference. @Immutable
gets priority (that is if you have entity that's annotated both as @Immutable
and @Entity(mutable = "true")
it is going to be treated as immutable).
@Immutable
can also be used on collections with pretty much the same semantics. Details are here