[ 
https://issues.apache.org/jira/browse/IGNITE-4887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16014992#comment-16014992
 ] 

Igor Gorkov commented on IGNITE-4887:
-------------------------------------

Yakov,

I think it will be useful in case of full JTA support.
XA specification says that calling xa_end method upon XA Resource should 
dissociate the thread from a transaction branch whereas xa_start should start 
or resume a transaction branch.

But in current ignite CacheJtaResource implementation of 
javax.transaction.xa.XAResource methods end and start do not work as described 
in the specification (nor in XAResource interface). E.g. flags like TMSUSPEND 
are ignored. (And I think in general XAResource interface is used not as it's 
developers intended it to be used)

It will be cool if we can fully implement XAResource with transaction branches 
switched between threads. I think we could manage some timeout monitors to 
heuristically finish stuck transactions.

Igor

> Support for starting transaction in another thread
> --------------------------------------------------
>
>                 Key: IGNITE-4887
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4887
>             Project: Ignite
>          Issue Type: Improvement
>          Components: general
>    Affects Versions: 1.9
>            Reporter: Alexey Kuznetsov
>            Assignee: Alexey Kuznetsov
>
> Consider the following pseudo-code:
> {code:xml}
>         IgniteTransactions transactions = ignite1.transactions();
>         Transaction tx = startTransaction(transactions);
>         cache.put("key1", 1);
>         tx.stop();
> {code}
> And in another thread:
> {code:xml}
>                 transactions.txStart(tx);
>                 cache.put("key3", 3);
>                 cache.remove("key2");
>                 tx.commit();
> {code}
> The Api should be implemented , that let you continue transaction in another 
> thread.
> method stop() should mark the transaction as unavailable for further commit.
> method txStart() should resume the transaction. 
> reason behind the proposal :
> Consider the next scenario:
> we begin transaction, doing some changes and start async future that will be 
> able to introduce futher changes into transaction and commit it in the end.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to