-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

OK...

I spent some type patching isAlreadyOpen and distributing updates .jar files to
my users.

Here is what I learned.

- - it isn't a synchronization issue in isAlreadyOpen.  I created a synchronized
  block around Log.class and it still fails.

- - the file DOES exist.

- - the delete() == false call is what is causing this.

- - canRead and canWrite both return true :(

I think the problem is the way that the file is opened.  Java states that on
some systems an open file is exclusive.

I think the problem is that on Windows, file operations in Java under Windows
are exclusive.

Maybe we should rewrite (make sense) Log.java to make sure that we don't try to
load the properties file while we are trying to save it.  Looking at the current
code, it appears that someone could call open in one thread (DBConnection) while
isAlreadyOpen is trying to be called in another thread.

Under UNIX/Linux... these are not exclusive and at least from Java, there is no
way to make them operate so.

So... my thinking (no suggestion yet) is that we just use a static synchronizer
so that the properties file is not written to during another write/read
operation.

Does that make sense?  It looks like we only have to modify isAlreadyOpen,
loadProperties and saveProperties...

As an aside.  Could a DB connection pool raise this issue?  It seems that it
might.  I am using Turbine's DB connection pool with 20 connections.  This
seems to work fine under Linux... obviously not find under Windows :)

Kevin

- -- 
Kevin A. Burton ( [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] )
             Location - San Francisco, CA, Cell - 415.595.9965
        Jabber - [EMAIL PROTECTED],  Web - http://relativity.yi.org/

Without enlightenment, there is only ignorance.
  -- famous Zen Koan



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt

iD8DBQE8h904AwM6xb2dfE0RAnKhAJ9Ax19sY6WNvumO9ct1iW/hGBb/sACaA/BF
kUio7UiJm1BHcXvaYOW33Y0=
=NzDY
-----END PGP SIGNATURE-----

_______________________________________________
hsqldb-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hsqldb-developers

Reply via email to