Yakov, We already have CacheSpringStoreSessionListener, but it was not used in the example (accidentally, I guess). I restored the example, made the fix and switched it to DbH2ServerStartup. Now it seems to work correctly.
I also made similar changes to CacheHibernateStoreExample. Can you please review my changes? -Val On Thu, Dec 17, 2015 at 1:39 AM, Yakov Zhdanov <yzhda...@apache.org> wrote: > Example, in state it has been removed in, does not add any value, but only > confusion. > > I think properly configured Spring stuff will make the trick. Most likely, > we will also need spring-enabled store listener. > > Val, can you please investigate and file a ticket with description? > > --Yakov > > 2015-12-17 12:10 GMT+03:00 Dmitriy Setrakyan <dsetrak...@apache.org>: > > > Yakov, > > > > And what would be the right way to fix this example? Remember, this > example > > exists because we have gotten questions about integrating with spring > > transactions from our users. > > > > D. > > > > On Thu, Dec 17, 2015 at 1:00 AM, Yakov Zhdanov <yzhda...@apache.org> > > wrote: > > > > > No, I don't want to add it back since example does not work. > > > > > > Val, I have just very thoroughly rechecked this and it seems you are > far > > > from being right. > > > > > > I see that connection used in ignite store listener and connection > (and, > > > moreover, sometimes 2 connections - in case of update-insert sequence) > > used > > > by jdbc template are different. And each connection gets requested and > > > closed by jdbc template on per operation basis. > > > > > > All you talk about can be achieved with explicitly configured tx > > manager. I > > > don't want to do it since it is 100% overkill for this example. > > > > > > So, I prefer not to add it back - we have 2 store examples more. > > > > > > --Yakov > > > > > > 2015-12-17 11:22 GMT+03:00 Dmitriy Setrakyan <dsetrak...@apache.org>: > > > > > > > Can we please add this example back? > > > > > > > > On Wed, Dec 16, 2015 at 10:45 PM, Valentin Kulichenko < > > > > valentin.kuliche...@gmail.com> wrote: > > > > > > > > > Yakov, > > > > > > > > > > Code in Spring example was not ignoring txs. There > > > > > was CacheJdbcStoreSessionListener which handles this automatically. > > > > That's > > > > > how Spring works - it enlists all calls to jdbcTemplate into > > > transaction > > > > if > > > > > it was opened by tx manager in this thread. > > > > > > > > > > -Val > > > > > > > > > >