[JBoss jBPM] - Issues with factories customization in jBPM 3.2.3?
by cgo
Hi there,
I'm trying to setup an enterprise configuration of jBPM 3.2.3 with Jboss AS 4.2.2 and followed the instructions in section 9.2 of the documentation. I have an issue when trying the long notation as described in section 6.2 of the documentation for factories to specify some properties, like
| <service name="persistence">
| <factory>
| <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
| <field name="dataSourceJndiName"><string value="java:/myDataSource"/></field>
| <field name="isCurrentSessionEnabled"><true /></field>
| <field name="isTransactionEnabled"><false /></field>
| </bean>
| </factory>
| </service>
|
vs
| <service name='persistence' factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' />
|
it looks like the properties I set are not used when the factories are initialized and the default values are used. I ended up writing my own factories with the default values set to the values I want to make it finally work but that is not really a clean solution to me. Am I the only one having this kind of issues or did I miss something during the configuration?
Thanks,
Cyril
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167694#4167694
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167694
16 years, 4 months
[JBoss jBPM] - Re: flush database
by gnagy
Hi Ronald,
Well, I hope you'll find time to visit us anyway. Then again, there is always next year!
We found a solution to the problem. It's brute, but works. Basically, before, we dropped the whole jbpm database, and then restarted jboss as, thereby recreating all tables again. Then, I noticed which tables were empty after a fresh start, and now we just empty those tables when needed. Here is the code:
for(String table: new String[] {"jbpm_db.jbpm_bytearray", "jbpm_db.jbpm_byteblock", "jbpm_db.jbpm_comment", "jbpm_db.jbpm_decisionconditions", "jbpm_db.jbpm_exceptionhandler", "jbpm_db.jbpm_job", "jbpm_db.jbpm_log", "jbpm_db.jbpm_moduleinstance", "jbpm_db.jbpm_pooledactor", "jbpm_db.jbpm_processinstance", "jbpm_db.jbpm_runtimeaction", "jbpm_db.jbpm_swimlaneinstance", "jbpm_db.jbpm_taskactorpool", "jbpm_db.jbpm_taskcontroller", "jbpm_db.jbpm_taskinstance", "jbpm_db.jbpm_token", "jbpm_db.jbpm_tokenvariablemap", "jbpm_db.jbpm_variableaccess", "jbpm_db.jbpm_variableinstance"}) {
DbUtils.emptyTable(em, table);
}
and in DBUtils.java:
public static void emptyTable(EntityManager em, String tableName) {
Query query = em.createNativeQuery("delete from " + tableName);
query.executeUpdate();
}
Luckily we didn't run into foreign key integrity issues.
We really need to remove all process data from the jbpm database, since we also empty our domain database, and any references to our domain model in jbpm will not be valid anymore.
Thanks for the suggestion, and good luck with your startup! I hope it will be fun :)
Greg
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167674#4167674
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167674
16 years, 4 months