Transactions

classic Classic list List threaded Threaded
5 messages Options
vsuslov vsuslov
Reply | Threaded
Open this post in threaded view
|

Transactions

This post has NOT been accepted by the mailing list yet.
This post was updated on .
hi, my Application does a lot of jobs through a command pattern and each command execution is wrapped by interceptors chain: executor->log interceptor->transaction interceptor->...

for transaction interceptor App uses Spring transaction interceptor and I'm writing now a Transaction manager for it.
there are template methods and my question is: do I need to synchronize some resource from ignite?
i mean DataSourceTransactionManager synchronizes datasource, Jms TM synchronizes connection factory and session.
Or I just need to use ignite.transactions().txStart() and Transaction commit/rollback() in apropriate methods?
---------------
Best regards,
Suslov Vadim
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Transactions

vsuslov wrote
hi, my Application does a lot of jobs through a command pattern and each command execution is wrapped by interceptors chain: executor->log interceptor->transaction interceptor->...

for transaction interceptor App uses Spring transaction interceptor and I'm writing now a Transaction manager for it.
there are template methods and my question is: do I need to synchronize some resource from ignite?
i mean DataSourceTransactionManager synchronizes datasource, Jms TM synchronizes connection factory and session.
Or I just need to use ignite.transactions().txStart() and Transaction commit/rollback() in apropriate methods?
As far as I understand, you're implementing PlatformTransactionManager interface. Am I right?

If so, I think you can simply use Ignite transactions API as you described. The only thing you should be aware of is that Ignite transaction is created per thread. So all cache operations has to be done in the same thread that will call methods on your new transaction manager.

-Val
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Transactions

I also think that such integration should be provided out of the box. Created ticket: https://issues.apache.org/jira/browse/IGNITE-1227

Feel free to contribute your implementation to Ignite ;-)

-Val
vsuslov vsuslov
Reply | Threaded
Open this post in threaded view
|

Re: Transactions

This post has NOT been accepted by the mailing list yet.
Ok, I would like to participate.
how can I do that? I saw information about it on the ignite web-page.
as I understand, I should do a fork from git-hub repo and make a branch from latest version branch with the name(number) of the jira issue?
---------------
Best regards,
Suslov Vadim
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Transactions

Vadim,

Please take a look at this page: https://ignite.apache.org/community/contribute.html#contribute. First of all you should subscribe to mailing list and write an email to dev@. We will be happy to see you in the community!

-Val