I'm not sure that this patch can be included in Apache Ignite.
javax.persistence.Transient annotation part of external dependency
(Persistence Api ) Apache Ignite core doesn't have external dependencies
(except cache-api). You can build your own build which will include this
patch and used it.

On Mon, Jul 31, 2017 at 11:27 AM, kestas <[email protected]> wrote:

> Ok, so i digged deeper in the problem and will try to describe it
> We want to cache persistent objects and need cache to function exactly like
> it is a DB in respect of javax.persistence.Transient annotated fields. Some
> business logic is doing deep object cloning and it needs those
> javax.persistence.Transient to be copied also. So we can't mark them with
> transient keyword, nor use readResolve. We have huge domain with hundreds
> of
> classes, i've looked into implementing BinarySerializer but this adds huge
> amount of code which have to be maintained for each object having transient
> fields. Same applies to Binarylizable plus it would add compile dependency
> on Ignite which we want to keep as a pluggable option.
> However small patch to ignite library seemd to solve my problems:
> ---
> src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
> (revision )
> +++
> src/main/java/org/apache/ignite/internal/binary/BinaryClassDescriptor.java
> (revision )
> @@ -392,7 +392,7 @@
>      private static boolean serializeField(Field f) {
>          int mod = f.getModifiers();
>
> -        return !Modifier.isStatic(mod) && !Modifier.isTransient(mod);
> +        return !Modifier.isStatic(mod) && !Modifier.isTransient(mod) &&
> (f.getAnnotation(javax.persistence.Transient.class) == null);
>      }
>
> is there any chance Ignite can add  support for handling
> javax.persistence.Transient annotations?
>
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Do-not-store-javax-persistence-Transient-fields-
> tp15604p15811.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Reply via email to