« Return to Thread: Does jencks canbe integrated with hybernate?
But my business logic is all these processing logic(threads) are independent, so i want to execute them parallely but if one business operation fails none of them should succeed.
so as you can see in the code iam just calling session.persist() method and not commiting to DB, once all the threads have completed their work iam calling commit on transaction manager(here i want to make use of transaction manager) also all the DB operations are done in one thread.
Does it make sence? or if you have any better idea of doing these(running parallely but atlast should be committed at one point) please let me know.gnodet wrote:As I already said, distributed transactions are transactions involving
several resources that may be remote (a database, jms broker, etc...).
But such transactions must be used within a single thread.
So what you are trying to do is certainly not permitted by both jta and spring.
If you need the whole process to be transacted, the only choice is to
have everything running sequentially. And the opposite: if you want
to work to be splitted across several threads (or even computers), you
can not use a single transaction.
If the processing time (apart from accessing the database) is length,
you could use several threads for it, but all database access must be
done from a single thread.
On 9/25/07, Arif Mohd <arif.mohammed1@wipro.com> wrote:
>
> Hi,
>
> Iam new to this jencks and even to hybernate. Just i want to know can i
> integrate jencks with hybernate. My requirement is there are 3 threads, 2 of
> them are hybernate session threads doing some DB operation and one more
> thread is using ActiveMQ. I want to make use of jenks for maintaing
> distributed transactions over these threads
> --
> View this message in context: http://www.nabble.com/Does-jencks-canbe-integrated-with-hybernate--tf4514305.html#a12875825
> Sent from the jencks - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
« Return to Thread: Does jencks canbe integrated with hybernate?
| Free embeddable forum powered by Nabble | Forum Help |