UD,
I'll take a stab at answering your question, though I'm still getting to
know H2 so others may have more authoritative answers.

In order to prevent multiple people from editing the profile at the same
time you need some sort of locking mechanism.  A standard way to do this
with a database is using the "SELECT ... FOR UPDATE" expression.  The H2
documentation says that this will lock the table, though it hasn't displayed
this behavior in my tests and I'm not sure why.  You probably don't want
that anyhow if you you want several people working on the same table.
 Switching to a database that supports row-level locks is a possibility.

I think your best bet is to implement locking with a separate table that
tracks administrators who are editing each profile.  This should work just
fine in H2.

       - Johann

On Tue, Feb 10, 2009 at 7:41 AM, UnkiDunki <[email protected]> wrote:

>
> Hi,
>
> I use H2 in a Java-Swing-application and would like to make it "multi-
> user-able" and i would like to know with techniques of H2 exists to
> make this "easier" realizable.
>
> Following problem/example:
>
> - Administration of customers with an interface to edit their profiles
> (JFrames).
> In this JFrame i use f.e. JTables, JTextFields, etc. and fill them
> with the data of the database.
>
> Now occures the problem when 2 users work at the same time at the same
> user profile...
>
> What is a good way to manage this and are their possibilities to
> handle this with H2?
>
> Already thanks a lot and if you need further informations please ask
> me!!
>
> UD
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to