Re: Cayenne and H2 on the desktop

From: Aristedes Maniatis (ar..aniatis.org)
Date: Wed Oct 21 2009 - 00:40:34 EDT

  • Next message: Mark Fraser: "deleting tomany objects"

    On 21/10/09 2:56 PM, Eric Lazarus wrote:
    > About the meaning of 'embedded': I think that the 2nd option has a
    > server process running tcp on some port number in the 9000's. Does this
    > count as an 'embedded' database? I assume not.
    >
    > Also, what happens in the
    > first case if the user opens two instances of the program on his
    > desktop. Does not each instance access the same files ? What kind of
    > locking is implemented in that case?

    I don't use H2, but for Derby:

    * you can 'embed' the Derby jar within your own application jar or you can run it standalone
    * if you embed it or if it runs standalone, you can have it open a TCP socket and communicate with it just as if it was a separate application. Other apps can also connect.
    * if you embed it, you can also use a different JDBC connector to connect directly without a TCP socket. That might be more secure, but it doesn't make anything simpler (or faster).
    * whatever you do, you cannot have two database engines (standalone or embedded) using the same files on disk. I'd guess that holds true for any database in existence today.

    Ari

    -- 
    

    --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A



    This archive was generated by hypermail 2.0.0 : Wed Oct 21 2009 - 00:41:40 EDT