users@glassfish.java.net

Re: JPA - entityManager.flush()

From: <glassfish_at_javadesktop.org>
Date: Thu, 17 May 2007 10:26:50 PDT

Witold,
The Ids of the tasks are not related, there are priorities and many other reasons which task should be processed first,


Marina,
This is intersting, I thought about it already, but:

1.I was wondering why it is not in the sepc, I don't like the idea that I have to tightthings to a specific DB vendor (Although I usually use Oracle and it supports locking very well, but still...)
2. Even if so, if I understand correctly, these locks more intended for porpuses where multiple transactions try to update the same row,

I dont have problems with updating, it is more an issue where a specific method (the scanner) should process only unlocked tasks, processing is not updating a row but doing other logical stuff,

The problem is that these entities should be read by other services, more than that, I don't even care if other transactions updates them. the important part is that when a scanner handles a task, I want to make sure that it would be the -only- thread that handles it. and again, handling a task does not mean updating its row in the DB.

Am I missing the idea? ;)

Thanks
[Message sent by forum member 'trouby' (trouby)]

http://forums.java.net/jive/thread.jspa?messageID=217689