Bug 778980 - Use JBoss Cache in the cluster configurations for jBPM
Summary: Use JBoss Cache in the cluster configurations for jBPM
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBPM - within SOA
Version: 5.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 5.1.0 GA
Assignee: Alejandro Guizar
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-08 11:16 UTC by Martin Weiler
Modified: 2012-07-13 04:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: SOA-1406
Environment:
'all' or 'production' configuration of the SOA-P
Last Closed: 2010-08-18 10:11:53 UTC
Type: Task


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SOA-1406 0 Blocker Closed Use JBoss Cache in the cluster configurations for jBPM 2013-02-26 09:07:25 UTC

Description Martin Weiler 2009-07-08 11:16:28 UTC
++ This bug is a clone of bug 778979 ++

Date of First Response: 2009-09-04 11:29:45
Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/314948
project_key: SOA

A cluster-safe 2nd level cache provider should be used instead of the HashtableCashProvider

Comment 1 Alejandro Guizar 2009-09-04 15:29:45 UTC
TSS article describing how to switch to JBoss Cache.
http://www.theserverside.com/tt/articles/article.tss?l=WorkflowEngineJBossCluster

Comment 4 nwallace 2010-01-22 15:30:18 UTC
Just thought I'd put Trev's answer in.
"That depends on the 4.3 schedule. However it's a customer request so it stands a pretty good chance. "

Comment 6 Alejandro Guizar 2010-07-22 18:59:17 UTC
Link: Added: This issue incorporates JBPM-2916


Comment 7 Toshiya Kobayashi 2010-07-27 02:58:23 UTC
===
The result of grep "CacheProvider" in jars shipped with EAP

--------------
./deploy/ejb3.deployer/jboss-ejb3.jar
org/jboss/ejb3/entity/OptimisticTreeCacheProviderHook.class
org/jboss/ejb3/entity/TreeCacheProviderHook.class 

./lib/hibernate3.jar
org/hibernate/cache/AbstractJndiBoundCacheProvider.class
org/hibernate/cache/CacheProvider.class
org/hibernate/cache/EhCacheProvider.class
org/hibernate/cache/HashtableCacheProvider.class
org/hibernate/cache/JndiBoundTreeCacheProvider.class
org/hibernate/cache/NoCacheProvider.class
org/hibernate/cache/OSCacheProvider.class
org/hibernate/cache/OptimisticTreeCacheProvider$TransactionManagerLookupAdaptor.class
org/hibernate/cache/OptimisticTreeCacheProvider.class
org/hibernate/cache/SwarmCacheProvider.class
org/hibernate/cache/TreeCacheProvider$TransactionManagerLookupAdaptor.class
org/hibernate/cache/TreeCacheProvider.class

./lib/jboss-hibernate.jar
org/jboss/hibernate/cache/DeployedTreeCacheProvider.class
---------------

===
The result of grep "CacheProvider" in hibernate-jbc-cacheprovider-1.0.1.GA.jar

---------------
./hibernate-jbc-cacheprovider-1.0.1.GA.jar

org/jboss/hibernate/jbc/cacheprovider/JndiBoundTreeCacheProvider.class
org/jboss/hibernate/jbc/cacheprovider/JmxBoundTreeCacheProvider.class
org/jboss/hibernate/jbc/cacheprovider/TreeCacheProvider.class
org/jboss/hibernate/jbc/cacheprovider/TreeCacheProvider$TransactionManagerLookupAdaptor.class
org/jboss/hibernate/jbc/cacheprovider/OptimisticJmxBoundTreeCacheProvider.class
org/jboss/hibernate/jbc/cacheprovider/OptimisticJndiBoundTreeCacheProvider.class
org/jboss/hibernate/jbc/cacheprovider/OptimisticTreeCacheProvider.class
---------------


http://community.jboss.org/wiki/JBossCacheHibernate
http://community.jboss.org/wiki/NewJBossCache14xBasedHibernate32CacheProvider

The new CacheProviders have performance improvement and (Optimistic)JmxBoundTreeCacheProvider is easier to configure. Of course, if we support them, SOA-P should include hibernate-jbc-cacheprovider-1.0.1.GA.jar.


Comment 9 Toshiya Kobayashi 2010-07-27 03:06:14 UTC
One consideration in http://www.theserverside.com/tt/articles/article.tss?l=WorkflowEngineJBossCluster is

<attribute name="CacheMode">REPL_ASYNC</attribute>

REPL_ASYNC may lose data integrity --- INVALIDATION_SYNC is the best option for entity cache, isn't it?

Comment 10 Toshiya Kobayashi 2010-07-27 03:18:31 UTC
How about configuring JBossCache with  <attribute name="CacheMode">LOCAL</attribute> for 'default' configuration of the SOA-P (not only for 'all' and 'production')?  EhCache may be ok.
HashtableCacheProvider would cause problem even in non-cluster environment as its cache entries don't expire.


Comment 11 Alejandro Guizar 2010-07-27 14:39:06 UTC
I've made good progress in the project issue JBPM-2916. The JBoss Cache configuration I checked into the jBPM codebase is based on the recommendation from the hibernate-jbc-cacheprovider project.
http://anonsvn.jboss.org/repos/jbossas/projects/cluster/hibernate-jbc-cacheprovider/trunk/src/test/java/org/jboss/hibernate/jbc/cacheprovider/functional/optimistic-treecache.xml

This configuration has an eviction policy; it should remedy the OOMEs. It is set for LOCAL cache mode as well. Oddly enough the comments state that INVALIDATION_ASYNC is recommended for use with clustered caches. Makes me wonder whether the data integrity issues have been resolved.
http://anonsvn.jboss.org/repos/jbpm/jbpm3/branches/jbpm-3.2-soa/modules/distribution/src/main/resources/service/jboss-service.xml

The selected cache provider is JmxBoundTreeCacheProvider. The plain TreeCacheProvider (from package org.jboss.hibernate.jbc.cacheprovider) is for standalone cache instances, whereas JndiBoundTreeCacheProvider is for JNDI-bound caches. Subclasses named like Optimistic*TreeCacheProvider are deprecated.
http://anonsvn.jboss.org/repos/jbpm/jbpm3/branches/jbpm-3.2-soa/modules/core/src/main/resources/hibernate.common.xml

The jBPM 3 distribution script uncomments the "Data source", "JTA transaction" and "Clustered cache" sections of the above configuration and comments out the "JDBC connection" and "Memory cache" sections. The "nonstrict-read-write" cache usage is replaced with "transactional". Additionally the installer bundles the hibernate-jbc-cacheprovider library. These changes to the standalone codebase need to be incorporated into the platform as part of SOA-1406.

Comment 12 Alejandro Guizar 2010-08-18 10:11:50 UTC
Configured jBPM to employ JBoss Cache 1.4 with Hibernate 3.2 on JBoss AS 4.x and JBoss Cache 2 with Hibernate 3.3 on JBoss AS 5.x. The IzPack installer writes one configuration or the other depending on the selected JBoss AS version.
Project issue JBPM-2916 resolved.

Comment 14 Alejandro Guizar 2010-10-01 23:24:37 UTC
Link: Added: This issue is related to SOA-2365


Comment 15 Laura Bailey 2010-12-17 00:34:28 UTC
Writer: Added: dlesage


Comment 16 Laura Bailey 2010-12-17 00:51:39 UTC
Release Notes Docs Status: Added: Documented as Resolved Issue


Comment 18 Dana Mison 2011-02-03 01:54:32 UTC
Release Notes Docs Status: Removed: Documented as Resolved Issue Added: Not Yet Documented
Labels: Removed: rn-dlesage rn-done-resolved Added: rn-dlesage


Comment 19 Dana Mison 2011-02-17 11:15:09 UTC
Writer: Removed: dlesage Added: Darrin
Release Notes Text: Added: JBoss Cache is now used in the cluster configuration of jBPM.


Comment 20 Dana Mison 2011-02-17 11:15:37 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue


Comment 21 Len DiMaggio 2011-11-29 17:18:32 UTC
Link: Added: This issue Cloned to SOA-3640



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