> $ java -cp .:sqlitejdbc-v042-native.jar -Djava.library.path=. Test
> inserting 1000 entries took 0.018 seconds
> $ java -cp sqlitejdbc-v042-nested.jar:. Test
> inserting 1000 entries took 0.018 seconds
Actually the number for the nestedvm test isn't right. The nested jar
still searches for the native library, and it turns out . is on the
default library path. Who knew.
$ rm libsqlitejdbc.jnilib
$ java -cp sqlitejdbc-v042-nested.jar:. Test
inserting 1000 entries took 0.658 seconds
So now I can start to see how you are locking for 2-5 seconds. It
wouldn't take too much of a hardware downgrade to see those numbers.
As always, I recommend using the native driver. As my last bungle
demonstrates, you can distribute the nested jar file with the library
files for each platform, telling people to put them on the library
path. E.g package:
sqlitejdbc-v042-nested.jar
libsqlitejdbc.jnilib
sqlitejdbc.dll
libsqlitejdbc.so
And make sure your program is started with
-Djava.library.path=whereever. This way it will use the native if
possible, otherwise it will fall back on the nested.
I really should put up instructions for this on the website. There
will also probably be a new version in a few days that lets you set
the timeout and uses a special subclass of SQLException for "db is
locked".
d.
--~--~---------~--~----~------------~-------~--~----~
Mailing List: http://groups.google.com/group/sqlitejdbc?hl=en
To unsubscribe, send email to [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---