Bug 794175 (JBEPP-1234)

Summary: Long transactions are not handled correctly by JCR
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: mposolda
Component: unspecifiedAssignee: Default User <jbpapp-maint>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.2.0.ER01CC: mposolda, trang.vu
Target Milestone: ---   
Target Release: 5.2.0.ER02   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEPP-1234
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-30 11:50:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
portal-configuration.xml
none
new-portal-config-exception.txt
none
dump4.txt none

Description mposolda 2011-09-29 14:53:51 UTC
project_key: JBEPP

When I have JCR transaction, which seems to do many save/update operations, then JCR is not updated correctly and objects are not saved into JCR at all. This can happen during import of large organization-configuration.xml or portal-configuration.xml .

Simple steps to reproduce:
- Add 100 users into portal-configuration.xml into section "NewPortalConfigListener" and param "user.configuration" . I am attaching my portal-configuration.xml (Note: By default it's only root user here. Adding 100 new users will force listener to init default site for every user even if users does not exist in IDM database)

- Run portal. After 5 minutes there is exception in server log (See attachement new-portal-config-exception.txt) because transaction is too long. (Seems that it only happens during large transactions where commit took 5 minutes or more)

From thread dump, I am seeing that almost whole time from that 5 minutes is spent in JBoss cache during commit of JCR transaction.

Comment 1 mposolda 2011-09-29 14:56:17 UTC
Attachment: Added: portal-configuration.xml
Attachment: Added: new-portal-config-exception.txt
Attachment: Added: dump4.txt


Comment 2 mposolda 2011-09-29 15:18:44 UTC
Link: Added: This issue is related to JBQA-5399


Comment 3 mposolda 2011-09-29 16:39:56 UTC
I've tried some workarounds but nothing helped. What I've tried so far is:
a) Disable managed transactions (Switch datasources to gatein-ds.xml to "no-local-tx" and in jcr-configuration.xml switch "always-managed" parameter to false)

b) Disable SessionRegistry cleaner thread to change it to some big value in repository-configuration.xml (added attribute session-max-age):

<repository name="repository" system-workspace="system" default-workspace="portal-system">
<security-domain>gatein-domain</security-domain>
<access-control>optional</access-control>
<session-max-age>3600000</session-max-age>
<authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>

c) Increase transactionTimeout from 300 to 3000 in server/default/deploy/transaction-jboss-beans.xml (No effect as JCR transaction is still cancelled after 5 minutes)


Comment 4 mposolda 2011-09-29 16:43:07 UTC
IMPORTANT POINT: I tried to downgrade JCR libs in EPP 5.2 ER1 in gatein.ear/lib from version from 1.14.0-GA to 1.14.0-CR4-CP01 and it helps to avoid initialization exception. So seems that problem is in JCR.

Comment 5 mposolda 2011-09-30 11:50:32 UTC
Release Notes Text: Added: Problem doesn't happen anymore with upgrade eXo JCR to 1.14.1-GA and related exo kernel, exo core and exo ws dependencies. This is done in EPP 5.2  by Jira JBEPP-1231 . So I am closing this for now.


Comment 6 Jared MORGAN 2011-11-22 03:33:51 UTC
Moving comment put in RN Text field to comment field:

Problem doesn't happen anymore with upgrade eXo JCR to 1.14.1-GA and related exo kernel, exo core and exo ws dependencies. This is done in EPP 5.2  by Jira JBEPP-1231 . So I am closing this for now.

Comment 7 Jared MORGAN 2011-11-22 03:33:51 UTC
Release Notes Docs Status: Added: Not Required
Release Notes Text: Removed: Problem doesn't happen anymore with upgrade eXo JCR to 1.14.1-GA and related exo kernel, exo core and exo ws dependencies. This is done in EPP 5.2  by Jira JBEPP-1231 . So I am closing this for now.