Eivind Barstad Waaler [
http://community.jboss.org/people/eivindbw] replied to the
discussion
"jBPM and caching"
To view the discussion, visit:
http://community.jboss.org/message/550352#550352
--------------------------------------------------------------
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.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/550352#550352]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]