cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to set autoCommit = true

agiledevpro
Champ in-the-making
Champ in-the-making
Hi,

I am wondering if there is a way to set auto commit = true in Activiti, I've tried adding
property name="defaultAutoCommit" value="true" in my activiti.cfg.xml file but this does not seem to have an effect.

the apache ibatis JdbcTransaction class is still setting autoCommit = false.

The reason why I want to have autoCommit = true is because I'm using cassandra as my database which do not support having auto commit = false.

Thanks in advance!

Regards
3 REPLIES 3

pmsevestre
Champ in-the-making
Champ in-the-making
Are you using trying Activiti with Cassandra as its main database ? Maybe you have good reasons to do so, but I can´t think of any.

Anyway, I suppose you´re using a JDBC driver for Cassandra. If you _really_, _really_ want to do so, you can achieve that by writing your own JDBC adapter that delegates most of its methods to the original Cassandra driver, but implements a fake setAutoCommit method.

If you want to be fancy, the same goal can be achieved by using AOP.

BTW, did I mention that I think this is a bad idea ? No ? Well, I´ll do it again: don´t do this.

That said, what you CAN do is use Cassandra as a store for historical data produced by your processes. Use listeners or explicit system tasks that pick relevant process instance data (eg: customer Id, product, task, assgnee, etc) and write to a given column family. You can then use a MapReduce tool in order to aggregate this information and publish in a nice dashboard that will make your business users very happy.

BTW: I´ve used this approach in one of my customers. In that particular case, I´ve used WSO2´s BAM (an open source product). This package comes with an embedded Cassandra and Hive components, making it a very good companion for any Activiti-based project.


agiledevpro
Champ in-the-making
Champ in-the-making
Hi, thank you for your answer!

Would be interesting to know why you think this isn't a good idea.

Regards

sankarts
Champ in-the-making
Champ in-the-making
I would like to do Cassandra as my database for Activiti integration.
It would be great, if Activiti team can comment on the

1) Can throw some light on "Right (the best) approach" to do this integration?

2) If its a bad idea, can elaborate on why its a bad idea?

Thanks in advance.