Hi,

The Ignite documentation implies that listeners can be set on transactions:

"IgniteTransactions interface contains functionality for starting and
completing transactions, as well as subscribing listeners or getting
metrics."
http://apacheignite.gridgain.org/v1.6/docs/transactions#ignitetransactions


However, when I look at the interfaces/classes, it is not clear to me how to
set transaction listeners.  
The behavior I am looking for is the following:

I'd like to make a call like this:
IgniteTransactionSubsystem.registerListener(myListener...)

When a transaction commits, I would like to have the listener notified
(callback) with the full contents of the transaction, even if it spanned
multiple caches....or at a minimum provide the cache keys and cache names
that were updated in a transaction.

I looked at the CacheJdbcStoreSessionListener example and saw this piece of
code in the sample persistence code:
// Configure JDBC session listener.
            cacheCfg.setCacheStoreSessionListenerFactories(new
Factory<CacheStoreSessionListener>() {
                @Override public CacheStoreSessionListener create() {
                    CacheJdbcStoreSessionListener lsnr = new
CacheJdbcStoreSessionListener();

                   
lsnr.setDataSource(JdbcConnectionPool.create("jdbc:h2:tcp://localhost/mem:ExampleDb",
"sa", ""));

                    return lsnr;
                }
            });

but it wasn't clear to me how these were supposed to work if they were the
correct way to listen for transaction.commits.

Continuous queries appear to offer event capability, but it isn't clear how
they work with transactions.

Thanks for the clarifications/help on how to do transaction listeners.




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/listening-for-events-on-transactions-tp5346.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Reply via email to