Re: [jboss-user] [jBPM] - How to configure 4.3 the right way?
by Marcel de Koster
Marcel de Koster [http://community.jboss.org/people/marcel.de.koster] replied to the discussion
"How to configure 4.3 the right way?"
To view the discussion, visit: http://community.jboss.org/message/536570#536570
--------------------------------------------------------------
Hi Christian,
You are missing the class attribute in your class-cache tags.
I am currently testing with following hbm files for jbpm4. In my hibernate config I map these files instead of the standard hbm files that are in JBPM.
To make the JobExecutor not use a query with a :now (timestamp) in it I needed to change the DbSessionImpl, to make the query cacheable. I now use current_timestamp() in the named query instead of the :now, that will be replaced by a timestamp parameter. I also added setCacheable on some of the queries that were in the DbSessionImpl.
I am not running your tests, I do however see, the database isn't called as many times as before from the JobExecutor. Now the cache is being hit each time. Still need to test more though, but this was what I was testing. Using jbpm with ehcache does not yet seem to give any problems in our application.
Regards,
Marcel
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536570#536570]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
Re: [jboss-user] [jBPM] - How to configure 4.3 the right way?
by Christian Moser
Christian Moser [http://community.jboss.org/people/Krossi] replied to the discussion
"How to configure 4.3 the right way?"
To view the discussion, visit: http://community.jboss.org/message/536565#536565
--------------------------------------------------------------
Thank you for your replies!
Huisheng
I took the standard configuration for 4.3. Where can I decrease transaction isolation?
Maciej:
I added your configuration part to jbpm.hibernate.cfg.xml. The results are better, but 70 ms vs. 25 ms is not really good.
jbpm.hibernate.cfg.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
-//Hibernate/Hibernate Configuration DTD 3.0//EN
http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd>
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm</property>
<property name="hibernate.connection.username">username</property>
<property name="hibernate.connection.password">password</property>
<property name="hibernate.hbm2ddl.auto">create-drop</property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="hibernate.cache.use_second_level_cache">true</property>
<property name="hibernate.cache.use_query_cache">true</property>
<mapping resource="jbpm.repository.hbm.xml" />
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
<class-cache usage="nonstrict-read-write"/>
<class-cache usage="nonstrict-read-write"/>
<class-cache usage="nonstrict-read-write"/>
<class-cache usage="nonstrict-read-write"/>
<class-cache usage="nonstrict-read-write"/>
<class-cache usage="nonstrict-read-write"/>
<class-cache usage="nonstrict-read-write"/>
<class-cache usage="nonstrict-read-write"/>
<class-cache usage="nonstrict-read-write"/>
<class-cache usage="nonstrict-read-write"/>
<class-cache usage="nonstrict-read-write"/>
</session-factory>
</hibernate-configuration>
Regards,
Christian
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536565#536565]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years