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

Nikolay Izhikov commented on IGNITE-5712:
-----------------------------------------

Semen.

Thank you for your review.
I'm working on comments you provide.
Here is some answers:

> in TxManager.resumeTx you call 'txTop.set(tx.topologyVersionSnapshot());', 
> why this is needed? I think tx.topologyVersionSnapshot() is always NONE there.

I'm not sure it needed.

I added this line because there are ThreadLocal variable that *can* be used for 
a transaction management.
So I want to setup consistent state in thread that try to resume tx.
If `txtTop` is unnecessary I can easily remove that line.

> is it possible to add in GridJtaTransactionManagerSelfTest case when tx is 
> resumed from another thread?

I think such test is out of scope of current issue.
Because transaction manage that Ignite uses for an internal tests(jotm-2.1.9) 
doesn't support resuming transaction in another thread.
Moreover resuming jta transaction in another thread is an optional feature for 
JTA-compliant transaction manager \[1\].

{noformat}
3.2.3 Suspending and Resuming a Transaction
A call to the TransactionManager.suspend method temporarily suspends the
transaction that is currently associated with the calling thread. 

...

Note that some transaction manager implementations allow a suspended 
transaction to
be resumed by a different thread. This feature is not required by JTA.
{noformat}



\[1\] http://download.oracle.com/otndocs/jcp/7286-jta-1.0.1-spec-oth-JSpec/

> Context switching for optimistic transactions
> ---------------------------------------------
>
>                 Key: IGNITE-5712
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5712
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: general
>            Reporter: Alexey Kuznetsov
>            Assignee: Nikolay Izhikov
>
> Implement context switching between threads for optimistic transactions



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to