You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Eric Shu (JIRA)" <ji...@apache.org> on 2017/11/02 20:25:00 UTC

[jira] [Commented] (GEODE-2349) Region.values() doesn't work properly inside JTA

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

Eric Shu commented on GEODE-2349:
---------------------------------

This is fixed now (as of Geode 1.4.0) by making region set operation transactional even if it is the first operation. See GEODE-3521.

> Region.values() doesn't work properly inside JTA
> ------------------------------------------------
>
>                 Key: GEODE-2349
>                 URL: https://issues.apache.org/jira/browse/GEODE-2349
>             Project: Geode
>          Issue Type: Bug
>          Components: transactions
>            Reporter: Vadim Lotarev
>            Assignee: Eric Shu
>            Priority: Major
>
> I experienced rather strange error invoking Region.values() within JTA transaction: {{java.lang.IllegalStateException: The Region collection is not transactional but is being used in a transaction}}.
> Doing some investigation I think I understand what is the cause of this error. Everything works if {{Region.values()}} invoked alone in transaction but failed if you invoke, say, {{get()}} on another (or the same) region before starting iteration over the collection returned by {{values()}}. I think that the reason of this error is the absence of {{discoverJTA()}} in {{values()}} method. So, when {{values()}} invoked first time {{EntriesSet}} is created with {{myTX = null}} since no transaction is determined (as soon as {{discoverJTA()}} is not invoked). If you are iterating immediately everything works as soon as there are no transaction on a region still ({{EntriesSet.myTx = null && topRegion.isTX() = false}}). But as soon as you invoke {{get()}} (or any other method where {{discoverJTA()}} is invoked) than all regions became transactional and next execution of {{EntriesSet.iterator()}} failed ({{EntriesSet.myTx = null && topRegion.isTX() = true}}).



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