jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From behrangsa <behran...@gmail.com>
Subject Comparing an RDBMS to JCR
Date Sun, 01 Oct 2006 22:54:53 GMT

Hi,

The concurrent update capability of JCR is a little bit confusing to me.

In an RDBMS, when I execute the following code sinppet simultaneously by a
few threads, no problem rises:

  tx.being();
  executeUpdate("insert into positions(id, name, parentId) values (?, ?,
1)");
  tx.commit();

In JCR, the equivalent to this seems to be:

  tx.begin();
  Node positions = session.getRootNode().getNode("positions");
  Node pos = positions.addNode("position");
  pos.setProperty("name", "some name");
  tx.commit();

But apparantly this throws an InvalidItemStateException (am I right?) when
multiple sessions concurrently execute this snippet of code. If this is
true, then how can one handle the aforementioned SQL operation in JCR?

Regards,
Behi (via Nabble :-)
-- 
View this message in context: http://www.nabble.com/Comparing-an-RDBMS-to-JCR-tf2366850.html#a6593713
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message