After having successfully overcome the "Raster serialization" problem, thanks to your advices, I'm now facing a few new difficulties.
First, replication is "slow".
In my current program, I'm trying to replicate synchronously between two instances of the cache a homemade POJO called RasterAdapter. This object (which is contained in another homemade, @Replicable POJO) contains a transient Raster, and writeObject()/readObject() methods with a custom serialization process. The fact is the execution of writeObject() is quite fast, the 40MB Raster is serialized and transferred very quickly, and successfully read by the second (remote) instance of the cache. But, after writeObject() and the remote readObject() complete (ensured by debug messages), the program waits curiously during approximately 5 seconds. No exception, no message, but it waits. Then, the execution goes on normally.
I'm using REPL_SYNC mode and REPEATABLE_READ isolation level, and my POJOs are attached to a path like: /common_part/of_the_path/unique_pojo_number
Maybe there's something with the locks, timeouts?
The other problem is even more strange.
When performing the operations described above, i.e. successively attach()ing several instrumented POJOs which contain my custom-serializable RasterAdapter, the result is uncertain. The replication between the 2 instances of the cache always seems to be performed, because the "replicate then wait" phenomenon is visible, and no exception is thrown. However, when doing a find() further in the program, it returns null approximately 25% of the time.
For a given Fqn, whether the find() is executed on one instance of the cache or the other changes nothing, and executing several find() does not change the result, which is at least coherent. In addition, when find() returns null, exists() returns false.
So I guess the attach() operation simply does not work in certain (random?) cases, and the cache does not consider the attached POJOs as present. I'm very surprised, maybe something with the paths again?
I hope those questions have not already been treated, and thank you in advance. Any advice would be greatly helpful.