Quantcast
Channel: MySQL Forums - NDB clusters
Viewing all articles
Browse latest Browse all 1560

ClusterJ multi thread java programming (no replies)

$
0
0
Hi there,

I'm trying to develop a java application using the ClusterJ API.
The application is multi threaded and is inserting and updating records in transactions. It is possible threads will insert but certainly update the same records. At this moment I'm running into problems being not all records are inserted and updated. What will be the best approach to to handle with this requirements ?
Right now my main thread constructs a SessionFactory and passes a connection obtained from the factory to every thread. Every thread tries to insert and update records, when a exception occurs a rollback is performed and the transaction is run again (this because of possible dupliacate inserts or deadlocks). The result of my tests are that not all records are inserted and updated.
Can anybody help me out how to setup this properly ?
Thanks in advance,
Arco

Viewing all articles
Browse latest Browse all 1560

Trending Articles