| Summary: | make disabling pre-loading by JBossCachePersistenceManager configurable | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Portal Platform 4 | Reporter: | Gary Hu <garyhu2> | ||||
| Component: | unspecified | Assignee: | Jboss Support <support-patch> | ||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | |||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 4.3.0.GA_CP3 | CC: | prabhat.jha | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 4.3.0.GA_CP3 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| URL: | http://jira.jboss.org/jira/browse/JBEPP-304 | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2010-05-05 11:53:15 UTC | Type: | Support Patch | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Deadline: | 2010-04-30 | ||||||
| Attachments: |
|
||||||
|
Description
Gary Hu
2010-04-14 16:28:03 UTC
Patch Commited to: http://svn.jboss.org/repos/portal/branches/JBP_CMS_1_2_7_CP03_JBEPP-304 Install the new cms-jackrabbit.jar into jboss-portal.sar/portal-cms.sar/lib Modify the JCRCMS mbean under portal-cms.sar/META-INF/jboss-service.xml: Look at the following <param name="enablePreLoading" value="false"/> parameter which occurs twice inside JBossCachePersistenceManager configuration <mbean code="org.jboss.portal.cms.impl.jcr.JCRCMS" name="portal:service=CMS" xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean"> <xmbean/> <!-- The datasource hibernate depends on, it can be commented when the file store is used --> <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends> <depends>portal:service=JAASLoginModule</depends> <depends>portal:service=Hibernate,type=CMS</depends> <depends>cms.pm.cache:service=TreeCache</depends> <depends optional-attribute-name="AuthorizationManager" proxy-type="attribute">portal:service=AuthorizationManager,type=cms</depends> <!-- Add this to activate publish/approval workflow integration --> <!-- <depends optional-attribute-name="ApprovePublishWorkflow" proxy-type="attribute">portal:service=ApprovePublish,type=Workflow</depends> --> <depends optional-attribute-name="StackFactory" proxy-type="attribute">portal:service=InterceptorStackFactory,type=Cms</depends> <attribute name="DoChecking">true</attribute> <attribute name="DefaultContentLocation">portal/cms/conf/default-content/default/</attribute> <attribute name="DefaultLocale">en</attribute> <attribute name="RepositoryName">PortalRepository</attribute> <attribute name="HomeDir">${jboss.server.data.dir}${/}portal${/}cms${/}conf</attribute> <attribute name="CmsSessionFactory">java:/portal/cms/CMSSessionFactory</attribute> <attribute name="Config"> <Repository> <!-- | virtual file system where the repository stores global state (e.g. registered namespaces, custom node types, etc.) | Configure to use FS or RDBMS. --> <!-- HibernateStore: uses RDBMS + Hibernate for storage --> <FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore"> <param name="schemaObjectPrefix" value="RepositoryEntry"/> <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/> </FileSystem> <!-- LocalFileSystem: uses FileSystem for storage. --> <!-- <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> <param name="path" value="${rep.home}/repository"/> </FileSystem> --> <Security appName="Jackrabbit"> <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager"/> <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule"> <!-- anonymous user name ('anonymous' is the default value) --> <param name="anonid" value="anonymous"/> </LoginModule> </Security> <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/> <Workspace name="${wsp.name}"> <!-- Virtual file system of the workspace: Configure to use FS or RDBMS. --> <!-- HibernateStore: uses RDBMS + Hibernate for storage --> <FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore"> <param name="schemaObjectPrefix" value="CMSEntry"/> <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/> </FileSystem> <!-- LocalFileSystem: uses FileSystem for storage. --> <!--<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> <param name="path" value="${wsp.home}"/> </FileSystem>--> <!-- persistence manager of the workspace. Use XMLPersistenceManager for LocalFileSystem Store and JBossCachePersistenceManager . --> <!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage --> <PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager"> <param name="schemaObjectPrefix" value="WSP"/> <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/> <param name="externalBLOBs" value="false"/> <param name="enablePreLoading" value="false"/> </PersistenceManager> <!-- XMLPersistenceManager: uses FileSystem for storage --> <!--<PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"/>--> <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex"> <param name="path" value="${wsp.home}/index"/> <param name="textFilterClasses" value="org.apache.jackrabbit.extractor.HTMLTextExtractor"/> <param name="useCompoundFile" value="true"/> <param name="minMergeDocs" value="100"/> <param name="volatileIdleTime" value="3"/> <param name="maxMergeDocs" value="100000"/> <param name="mergeFactor" value="10"/> <param name="bufferSize" value="10"/> <param name="cacheSize" value="1000"/> <param name="forceConsistencyCheck" value="false"/> <param name="autoRepair" value="true"/> </SearchIndex> </Workspace> <Versioning rootPath="${rep.home}/versions"> <!-- Configures the filesystem to use for versioning for the respective persistence manager Configure to use FS or RDBMS. --> <!-- HibernateStore: uses RDBMS + Hibernate for storage --> <FileSystem class="org.jboss.portal.cms.hibernate.HibernateStore"> <param name="schemaObjectPrefix" value="VersionEntry"/> <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/> </FileSystem> <!-- LocalFileSystem: uses FileSystem for storage. --> <!-- <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> <param name="path" value="${rep.home}/versions"/> </FileSystem> --> <!-- Configures the persistence manager to be used for persisting version state. Use XMLPersistenceManager for LocalFileSystem Store and JBossCachePersistenceManager for HibernateStore. --> <!-- HibernatePersistentManager: uses RDBMS + Hibernate for storage --> <PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager"> <param name="schemaObjectPrefix" value="Version"/> <param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/> <param name="externalBLOBs" value="false"/> <param name="enablePreLoading" value="false"/> </PersistenceManager> <!-- XMLPersistenceManager: uses FileSystem for storage --> <!--<PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"/>--> </Versioning> </Repository> </attribute> <attribute name="JNDIName">java:portal/CMS</attribute> </mbean> The patched source code has been committed. The next step is to ship to QE for testing. Link: Added: This issue is related to JBEPP-165 The fix has been committed to the svn. SVN / CVS Isolated Branch: Added: http://svn.jboss.org/repos/portal/branches/JBP_CMS_1_2_7_CP03_JBEPP-304 Patch Instructions: Added: 1) use the attached jar to replace the one: $EPP_HOME/server/$PROFILE/deploy/jboss-portal(-ha).sar/portal-cms.sar/lib/cms-jackrabbit.jar
2) add the param "<param name="enablePreLoading" value="true"/>" to <PersistenceManager"> of MBean
<mbean code="org.jboss.portal.cms.impl.jcr.JCRCMS" name="portal:service=CMS" ...> in the file
$EPP_HOME/server/$PROFILE/deploy/jboss-portal(-ha).sar/portal-cms.sar/META-INF/jboss-service.xml.
Please note that there are two entries of <PersistenceManager in the portal:service=CMS, so there are two entries of the param "enablePreLoading" too. If the value is set as "true"
the pre-loading will be enabled. You should be able to see something like "Pre-loading the PersistenceManager Cache in the background (started)......." in the server.log. If the value
is set as "false" the pre-loading is disabled. You then should not see "Pre-loading ...", instead, you will see "JBossCachePersistenceManager is disabled........." in the server.log.
The following is an example snippet of the jboss-service.xml that sets the param "enablePreLoading":
<mbean code="org.jboss.portal.cms.impl.jcr.JCRCMS" name="portal:service=CMS" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
...
<attribute name="Config">
<Repository>
....
<Workspace name="${wsp.name}">
...
<PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
<param name="schemaObjectPrefix" value="WSP"/>
<param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
<param name="externalBLOBs" value="false"/>
<param name="enablePreLoading" value="true"/>
</PersistenceManager>
...
</Workspace>
<Versioning rootPath="${rep.home}/versions">
...
<PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
<param name="schemaObjectPrefix" value="WSP"/>
<param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
<param name="externalBLOBs" value="false"/>
<param name="enablePreLoading" value="true"/>
</PersistenceManager>
...
</Versioning>
</Repository>
</attribute>
...
</mbean>
Attachment: Added: cms-jackrabbit-1.2.7.jar The patch is ready for test. The customer can't wait for next CP release which is targeted at June 2010. I've notified the customer that the patched jar is available for testing. They can also test in their environment to see if it solves their issue. I've told them don't use it in production environment until it passes our QE process. We will provide an official patch when the QE process is complete. There's another jira to include this fix to the next CP-05 release https://jira.jboss.org/jira/browse/JBEPP-165 To test the patch:
1) Replace $EPP_HOME/server/$PROFILE/deploy/jboss-portal(-ha).sar/portal-cms.sar/lib/cms-jackrabbit.jar with the version contained in this patch distribution.
2) add the param "<param name="enablePreLoading" value="true"/>" to <PersistenceManager"> of MBean <mbean code="org.jboss.portal.cms.impl.jcr.JCRCMS" name="portal:service=CMS" ...>
set in the file $EPP_HOME/server/$PROFILE/deploy/jboss-portal(-ha).sar/portal-cms.sar/META-INF/jboss-service.xml.
Please note that there are two entries of <PersistenceManager in the portal:service=CMS, so there are two entries of the param "enablePreLoading" too. If the value is set as "true"
the pre-loading will be enabled. You should be able to see something like "Pre-loading the PersistenceManager Cache in the background (started)......." in the server.log. If the value
set as "false" the pre-loading is disabled. You then should not see "Pre-loading ...", instead, you will see "JBossCachePersistenceManager is disabled........." in the server.log.
The following is an example snippet of the jboss-service.xml that sets the param "enablePreLoading":
<mbean code="org.jboss.portal.cms.impl.jcr.JCRCMS" name="portal:service=CMS" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
...
<attribute name="Config">
<Repository>
....
<Workspace name="${wsp.name}">
...
<PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
<param name="schemaObjectPrefix" value="WSP"/>
<param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
<param name="externalBLOBs" value="false"/>
<param name="enablePreLoading" value="true"/>
</PersistenceManager>
...
</Workspace>
<Versioning rootPath="${rep.home}/versions">
...
<PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
<param name="schemaObjectPrefix" value="WSP"/>
<param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
<param name="externalBLOBs" value="false"/>
<param name="enablePreLoading" value="true"/>
</PersistenceManager>
...
</Versioning>
</Repository>
</attribute>
...
</mbean>
Patch Instructions: Removed: 1) use the attached jar to replace the one: $EPP_HOME/server/$PROFILE/deploy/jboss-portal(-ha).sar/portal-cms.sar/lib/cms-jackrabbit.jar
2) add the param "<param name="enablePreLoading" value="true"/>" to <PersistenceManager"> of MBean
<mbean code="org.jboss.portal.cms.impl.jcr.JCRCMS" name="portal:service=CMS" ...> in the file
$EPP_HOME/server/$PROFILE/deploy/jboss-portal(-ha).sar/portal-cms.sar/META-INF/jboss-service.xml.
Please note that there are two entries of <PersistenceManager in the portal:service=CMS, so there are two entries of the param "enablePreLoading" too. If the value is set as "true"
the pre-loading will be enabled. You should be able to see something like "Pre-loading the PersistenceManager Cache in the background (started)......." in the server.log. If the value
is set as "false" the pre-loading is disabled. You then should not see "Pre-loading ...", instead, you will see "JBossCachePersistenceManager is disabled........." in the server.log.
The following is an example snippet of the jboss-service.xml that sets the param "enablePreLoading":
<mbean code="org.jboss.portal.cms.impl.jcr.JCRCMS" name="portal:service=CMS" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
...
<attribute name="Config">
<Repository>
....
<Workspace name="${wsp.name}">
...
<PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
<param name="schemaObjectPrefix" value="WSP"/>
<param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
<param name="externalBLOBs" value="false"/>
<param name="enablePreLoading" value="true"/>
</PersistenceManager>
...
</Workspace>
<Versioning rootPath="${rep.home}/versions">
...
<PersistenceManager class="org.jboss.portal.cms.hibernate.state.JBossCachePersistenceManager">
<param name="schemaObjectPrefix" value="WSP"/>
<param name="JNDIName" value="java:/portal/cms/CMSSessionFactory"/>
<param name="externalBLOBs" value="false"/>
<param name="enablePreLoading" value="true"/>
</PersistenceManager>
...
</Versioning>
</Repository>
</attribute>
...
</mbean>
Added: PATCH NAME:
JBEPP-304
PRODUCT NAME:
JBoss Enterprise Portal Platform (EPP)
VERSION:
4.3-CP03
SHORT DESCRIPTION:
Making pre-loading by JBossCachePersistenceManager configurable
LONG DESCRIPTION:
Making pre-loading by JBossCachePersistenceManager defined in JCRCMS MBean service configurable
MANUAL INSTALL INSTRUCTIONS:
Replace $EPP_HOME/server/$PROFILE/deploy/jboss-portal(-ha).sar/portal-cms.sar/lib/cms-jackrabbit.jar with the version contained in this patch distribution.
COMPATIBILITY:
N/A
DEPENDENCIES:
N/A
SUPERSEDES:
N/A
SUPERSEDED BY:
JBoss EPP 4.3-CP05
CREATOR:
Gary Hu
DATE:
2010/05/04
The patch is available for download from the following location: https://support.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=2643 Patch Repository Link: Added: https://support.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=2643 |