Bug 834635 - JBoss cache used for picketlink should be JTA-aware
JBoss cache used for picketlink should be JTA-aware
Status: ASSIGNED
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal (Show other bugs)
5.2.1.ER02,5.2.2.CR01
Unspecified Unspecified
unspecified Severity medium
: ---
: 5.2.x
Assigned To: mposolda
:
Depends On: JBEPP-891
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-22 11:56 EDT by mposolda
Modified: 2013-10-11 14:52 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
CAUSE: Currently JBoss Cache used for Picketlink IDM is not aware of JTA. This could mean for example, that rollback of JTA transaction won't rollback JBoss Cache records, added during this JTA transaction. WORKAROUND: Uncomment TransactionManagerLookup in configuration file gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml: <transaction transactionManagerLookupClass="org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup" /> Problem is that implementing this workaround is introducing another two problems described in bugs 841320 and 840917. So applying workaround is not recommended for now.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Commits:
8740 by mposolda at 2012-06-22 12:02:01 EDT (show)
8740 by mposolda at 2012-06-22 12:02:01 EDT

Checked in to /mnt/n4aphx2-3.storage.phx2.redhat.com/svn/repos/gatein

Bug 834635 - JBoss cache for Picketlink IDM will be JTA aware now

3 files changed:

  • epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache-api-cluster.xml (+3 / -0)
  • epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache-store-cluster.xml (+3 / -0)
  • epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml (+3 / -0)


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker GTNPORTAL-2482 Major Resolved JBoss cache used for picketlink should be JTA-aware 2016-10-03 15:00 EDT

  None (edit)
Description mposolda 2012-06-22 11:56:52 EDT
Currently JBoss Cache used for Picketlink IDM is not aware of JTA. This could mean for example, that rollback of JTA transaction won't rollback JBoss Cache records, added during this JTA transaction.

Example steps to reproduce:
- Configure EPP for JTA according to instructions https://community.jboss.org/wiki/JTAIntegrationWithGateIn
- Login as john, Go to OrganizationManagementPortlet and try to add new group. Type some name of new group (for example "newgroup") and click "Save". Now what is done is:
-- New JTA transaction is started
-- New group is created into Picketlink IDM database
-- Picketlink IDM sends query for obtain new list of groups. New group "mynewgroup" is included in the query result. And result groups are saved into Picketlink IDM cache.
-- Now let's say that JTA transaction is rolled-back because of timeout. All changes related to "mynewgroup" are cleaned from DB, but items in PL IDM JBoss cache are not rolled-back but they are still here. So there is still record about the group "mynewgroup".
Comment 1 Michal Vanco 2012-07-17 07:53:20 EDT
JBossStandaloneJTAManagerLookup is now added at picketlink JBC configuration files.
Comment 2 mposolda 2012-08-13 07:12:13 EDT
Issue is reverted in 5.2.2 CR01 as it's causing regressions 841320 and 840917. So configuration of TransactionManagerLookup was commented after all.
We need to verify scenarios described in 841320 and 840917 as well when fixing this one.

Thing is that when TransactionManagerLookup is uncommented and JBoss Cache is JTA-aware, then IDMUserListAccess added into IntegrationCache is sometimes lost after commit of JTA transaction and old instance of IDMUserListAccess is restored. Proper fix will require further investigation at JBoss Cache level.  

Simple application for test this issue: https://github.com/mposolda/jcr-transaction-test
Comment 3 mposolda 2012-08-13 07:15:42 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
CAUSE: Currently JBoss Cache used for Picketlink IDM is not aware of JTA. This could mean for example, that rollback of JTA transaction won't rollback JBoss Cache records, added during this JTA transaction.

WORKAROUND: Uncomment TransactionManagerLookup in configuration file gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml:

<transaction
transactionManagerLookupClass="org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup" />

Problem is that implementing this workaround is introducing another two problems described in bugs 841320 and 840917. So applying workaround is not recommended for now.

Note You need to log in before you can comment on or make changes to this bug.