ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: SoreSessionListener, cacheLoaderFactory, cacheWriterFactory implementation examples
Date Sun, 10 Jan 2016 05:29:32 GMT

As a first step I would recommend to refer to cache store examples provided
in Ignite: JDBC-based [1], Spring-based [2] and Hibernate-based [3]. They
all are pretty similar and demonstrate similar functionality, but
implemented using different tools. Note that corresponding session listeners
are already implemented and provided out of the box.
BTW, I think JPA/JTA-based implementation could be also useful, I create a
ticket for this [4].

In general, store session scope depends on cache atomicity mode. In ATOMIC
cache a new session is always created for each operation, while in
TRANSACTIONAL cache it spawns all operations in a single transaction. The
latter allows you to commit/rollback DB transaction along with the cache
transaction and therefore maintain transactional consistency between cache
and the DB.

As for configuration, you will have to deploy cache reader/writer
implementation classes on all nodes. Note that you provide Factory in
configuration instead of reader/writer instance, so it created only on the
node where it will be used. This allows to make reader/writer

[4] https://issues.apache.org/jira/browse/IGNITE-2345

Let us know if you have more questions.


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/SoreSessionListener-cacheLoaderFactory-cacheWriterFactory-implementation-examples-tp2462p2477.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message