-
1. Re: jBPM and caching
newbeewan Jun 30, 2010 6:01 AM (in response to eivindbw)Hi,
Have you tried to activate EHCache for hibernate ?
I think it may help you even if it is sub-optimised with a very general configuration...
Regards
-
2. Re: jBPM and caching
eivindbw Jun 30, 2010 6:09 AM (in response to newbeewan)Thanks for the reply. I have tried, but it does not seem to have much effect.
Looks like many of the API-methods are implemented using hql-queries or criteria searches, and none of them have enabled caching. I have enabled class and collection caching, but it does not have much effect when most of the logic runs like queries that are not being cached..
As an example this "regular" way of getting a user is not cached:
org.jbpm.api.identity.User user = identityService.findUserById(userName);
In order to get caching working here we need to reimplement the criteria search used:
org.jbpm.api.identity.User user = (org.jbpm.api.identity.User) session .createCriteria(UserImpl.class) .add(Restrictions.eq("id", userName)) .setCacheable(true) .uniqueResult();
Not a big deal for such a simple method, but more of a concern seeing that it is the same for all queries in the system.
-
3. Re: jBPM and caching
newbeewan Jul 1, 2010 5:50 AM (in response to eivindbw)Hi,
It's a very good idea, I think you could open a JIRA request for that
Regards