Bug 793696 (JBEPP-772)

Summary: Use JndiMultiplexedJBossCacheRegionFactory for IDM second level cache to make switching to TCP easier
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: Martin Weiler <mweiler>
Component: PortalAssignee: hfnukal <hfnukal>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.1.0.GACC: boleslaw.dawidowicz, hfnukal, mweiler
Target Milestone: ---   
Target Release: 5.1.1.DEV01   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEPP-772
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-30 12:50:50 UTC Type: Task
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 793657    

Description Martin Weiler 2011-01-10 10:47:54 UTC
Help Desk Ticket Reference: https://na7.salesforce.com/500A0000005ezKT
project_key: JBEPP

conf/organization/idm-configuration.xml currently defines the following hibernate.properties:
 
        <name>hibernate.properties</name>
        <description>Default Hibernate Service</description>
        <property name="hibernate.cache.region.jbc2.query.localonly" value="true" />
        <property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory"

This results in two cache instances (entity-cache and timestamp-cache) being used, defined in hibernate-jbosscache2.jar/org/hibernate/cache/jbc2/builder/jbc2-configs.xml and set up with JGroups stack 'udp', even if the server is started with -Djboss.default.jgroups.stack=tcp:

2011-01-10 11:37:08,037 DEBUG [org.jboss.cache.RPCManagerImpl] (main) Created Multiplexer Channel for cache cluster optimistic-entity using stack udp
---------------------------------------------------------
GMS: address is 127.0.0.1:52612 (cluster=udp)
---------------------------------------------------------
2011-01-10 11:37:10,160 DEBUG [org.jboss.cache.RPCManagerImpl] (main) Created Multiplexer Channel for cache cluster timestamp-cache using stack udp

According to [1],  org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactory is best to be used inside JBoss AS. Therefore, the above configuration should be changed to:

        <name>hibernate.properties</name>
        <description>Default Hibernate Service</description>
        <property name="hibernate.cache.region.jbc2.query.localonly" value="true" />
        <property name="hibernate.cache.region.jbc2.cachefactory" value="java:CacheManager"/>
        <property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactory" />

With this configuration, the JBoss Cache instances are created as defined in deploy/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml, where the 'jboss.partition.name' and 'jboss.default.jgroups.stack' startup options are properly incorporated.

[1] http://docs.jboss.org/jbossclustering/cluster_guide/5.1/html/clustering-entity.html

Comment 1 Martin Weiler 2011-01-10 10:48:53 UTC
Link: Added: This issue is related to JBEPP-736


Comment 2 boleslaw.dawidowicz 2011-01-17 08:45:50 UTC
Thomas, I think this part of EPP config is not in sync with gatein anyway so looks like this JIRA should be applied directly to EPP build patches - no merge with gatein sources required. 

On the other hand we could put the same config changes in gatein with <properties-param profiles="jboss"> switch. In such case reassign to me and I'll test with gatein build. 

Comment 4 hfnukal@redhat.com 2011-03-29 10:19:37 UTC
Link: Added: This issue is a dependency of JBEPP-735


Comment 5 Martin Weiler 2011-04-11 12:50:36 UTC
Link: Added: This issue is related to JBEPP-782


Comment 9 hfnukal@redhat.com 2011-04-14 13:53:12 UTC
Additional improvement applyed.

Comment 10 Scott Mumford 2011-08-09 03:05:10 UTC
Release Notes Docs Status: Added: Documented as Resolved Issue
Release Notes Text: Added: In this release of JBoss Enterprise Portal Platform, JndiMultiplexedJBossCacheRegionFactory is used for IDM second level caching. This makes it easier to switch to TCP.