| Summary: | jBPM does not work of-the-box with HashtableCacheProvider enabled | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise SOA Platform 5 | Reporter: | Jiri Pechanec <jpechane> | ||||||||
| Component: | JBPM - within SOA | Assignee: | Julian Coleman <jcoleman> | ||||||||
| Status: | CLOSED NEXTRELEASE | QA Contact: | |||||||||
| Severity: | urgent | Docs Contact: | |||||||||
| Priority: | urgent | ||||||||||
| Version: | 5.1.0.ER2 | CC: | alex.guizar, kevin.conner | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | 5.1.0 GA, 5.1.0.ER7 | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| URL: | http://jira.jboss.org/jira/browse/SOA-2365 | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2011-02-11 02:55:39 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
Jiri Pechanec
2010-10-01 09:01:49 UTC
Link: Added: This issue is related to JBPAPP-4859 Link: Added: This issue related SOA-1406 I have spent a while configuring and testing JBoss Cache 1.4 and 2 as second-level cache provider for Hibernate 3.2 and 3.3 respectively, under SOA-1406. JBoss Cache is not enabled in the "standalone" jBPM configuration, only in the "enterprise" configuration, which SOA-P does not currently consume. We need to work together in order to incorporate the "enterprise" configuration into the platform. Here is an outline of what needs to be done, based on my experience with JBoss AS. First off, it is worth noting that SOA-P 4.3 ships with Hibernate 3.2/JBC 1.4, whereas SOA-P 5 ships with Hibernate 3.3 and JBC 2. Each Hibernate/JBC combination needs to be configured differently. 1. Configure Hibernate to employ JBoss Cache as its 2nd level cache. Change the cache mode from "nonstrict-read-write" to "transactional" 2. For Hibernate 3.2/JBC 1.4, deploy a TreeCache MBean and add hibernate-jbc-cacheprovider.jar to the server configuration libraries. In the case of Hibernate 3.3/JBC 2, a multiplexed cache is readily available in SOA-P 5. 3. Set up continuous integration. As a reference, the jbpm3-jbossXXX jobs start JBoss AS in the "all" configuration and specify a group name and multicast address. Afterwards the jobs run the jbpm-enterprise test suite. Attachment: Added: hibernate.cfg.xml.diff I am attaching a diff file containing the hibernate.cfg.xml changes required to switch to JBoss Cache, see step 1 above. The differences were generated with respect to SOA-P 5.1.0.ER2. I applied these changes to the current 5.1.0 ER and did not see any issues on startup, will get this added for clustered profiles. production config after applying the changes Attachment: Added: hibernate.cfg.xml Assigning to Julian as the platform build modifies this file. Resolved with revision 7419 of: build-tools/post-patch/add_jbpm_cache.xml build-tools/resource/add_jbpm_cache.xsl Commit message: SOA-2365 Use the clustered cache configuration for the clustered profiles (`all' and `production'). Labels: Added: rn-dlesage The release notes entry should be something like: Use the clustered cache hibernate configuration for jBPM in the clustered profiles (`all' and 'production'), avoiding problems with the memory cache and clustering. The memory cache remains configured for the non-clustered profile (`default'). Link: Added: This issue related SOA-2652 Unfortunately this issue is not complete. The hibernate configuration uses default stack values for the jgroups configuration, conflicting with other deployments. We need to have an explicit configuration which doesn't use those defaults and entries in the service bindings to allow them to be overridden. Writer: Added: dlesage Release Notes Docs Status: Added: Not Yet Documented The "Best Practices" section in the "Using JBoss Cache 2 with Hibernate" guide recommends "set[ting] hibernate.cache.region_prefix in your configuration. It makes it simple to ensure the different session factories don't step on each other if they share a JBoss Cache instance". The hibernate.cfg.xml.diff file I attached earlier does not contain the hibernate.cache.region_prefix property. It should also employ JndiMultiplexedJBossCacheRegionFactory which "instead of instantiating its own CacheManager, looks for an existing one in JNDI [allowing for] sharing the various JBoss Cache instances across multiple Hibernate session factories". I will work on a new patch file containing the above changes. WorklogId: Removed: 12423609 Attachment: Added: hibernate.cfg.xml-2010-12-17.patch Attaching patch to: * Switch to JNDI multiplexed JBoss Cache region factory * Provide an explicit cache region prefix. We need to have an explicit jgroups configuration, specified through the hibernate.cfg.xml, so that the contents can be modified as appropriate. Part of this modification will be driven through the service bindings (see server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml for current examples) Sorry, missed the JndiMultiplexedJBossCacheRegionFactory change. Ignore my last. Release Notes Text: Added: Resolved with revision 7713 of: build-tools/post-patch/add_jbpm_cache.xml build-tools/resource/add_jbpm_cache_2.xsl (added) Commit message: SOA-2365 Apply changes in "hibernate.cfg.xml-2010-12-17.patch" to hibernate.cfg.xml in all and production profiles. Verified in ER6 - configuration is in place Re-opening, as the clustered cache settings have been applied in revision 6874: http://anonsvn.jboss.org/repos/jbpm/jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/hibernate.common.xml and we need to account for this in the platform patches. Resolved with revision 7916 of:
build-tools/post-patch/add_jbpm_cache.xml
build-tools/resource/add_jbpm_cache_2.xsl (removed)
Commit message:
SOA-2365
The clustered cache settings have been applied in revision 6874 of:
http://anonsvn.jboss.org/repos/jbpm/jbpm3/branches/jbpm-3.2-soa/core/src/main/resources/hibernate.common.xml
Remove these changes from the platform patch.
Release Notes Text: Removed: Resolved with revision 7713 of: build-tools/post-patch/add_jbpm_cache.xml build-tools/resource/add_jbpm_cache_2.xsl (added) Commit message: SOA-2365 Apply changes in "hibernate.cfg.xml-2010-12-17.patch" to hibernate.cfg.xml in all and production profiles. Added: Use the clustered cache hibernate configuration for jBPM in the clustered profiles (`all' and 'production'), avoiding problems with the memory cache and clustering. The jgroups configuration for the clustered cache has also been enhanced to enable it to co-exist with other jgroups users. Note, that the memory cache remains configured for the non-clustered profile (`default'). Verified in ER7 Temporarily reopening to update release note info. Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Known Issue Release Notes Text: Removed: Use the clustered cache hibernate configuration for jBPM in the clustered profiles (`all' and 'production'), avoiding problems with the memory cache and clustering. The jgroups configuration for the clustered cache has also been enhanced to enable it to co-exist with other jgroups users. Note, that the memory cache remains configured for the non-clustered profile (`default'). Added: https://issues.jboss.org/browse/SOA-2365 jBPM would not working if the HashtableCacheProvider was enabled. An exception would result. Use the clustered cache hibernate configuration for jBPM in the clustered profiles (`all' and 'production') to avoiding problems with the memory cache and clustering. (The jgroups configuration for the clustered cache has also been enhanced to enable it to co-exist with other jgroups users.) Note, that the memory cache remains configured for the non-clustered profile (`default'). |