Re: closing embedded database with DB_CLOSE_DELAY=-1

2011-10-26 Thread Thotheolh
Disconnecting the H2 via JDBC should usually handle it internally.

Do you have sample working codes, test cases and errors or warnings
that can be reproduced ?

On Oct 26, 12:17 pm, Adam McMahon a...@cs.miami.edu wrote:
 Hi everyone,

 I am using an embedded Database with DB_CLOSE_DELAY=-1.  I could not
 find a simple way to close this type of database from within Java
 code.

 I would like H2 to be able to close a bit more graceful, currently I
 am getting the tomcat warning: appears to have started a thread named
 [H2 File Lock Watchdog /home/adam/mydb.lock.db] but has failed to stop
 it.

 I do not want to make the Database a resource that is handled by
 tomcat, but I would like to open and close it via code.  Of course
 opening it is easy, but can't figure out how to close it when I want
 to.

 Thanks,

 -Adam

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



Re: closing embedded database with DB_CLOSE_DELAY=-1

2011-10-26 Thread Thomas Mueller
Hi,

To close the database, execute the SQL statement SHUTDOWN
(Statement.execute(SHUTDOWN)).

Regards,
Thomas


On Wednesday, October 26, 2011, Adam McMahon wrote:

 Hi everyone,

 I am using an embedded Database with DB_CLOSE_DELAY=-1.  I could not
 find a simple way to close this type of database from within Java
 code.

 I would like H2 to be able to close a bit more graceful, currently I
 am getting the tomcat warning: appears to have started a thread named
 [H2 File Lock Watchdog /home/adam/mydb.lock.db] but has failed to stop
 it.

 I do not want to make the Database a resource that is handled by
 tomcat, but I would like to open and close it via code.  Of course
 opening it is easy, but can't figure out how to close it when I want
 to.

 Thanks,

 -Adam

 --
 You received this message because you are subscribed to the Google Groups
 H2 Database group.
 To post to this group, send email to 
 h2-database@googlegroups.comjavascript:;
 .
 To unsubscribe from this group, send email to
 h2-database+unsubscr...@googlegroups.com javascript:;.
 For more options, visit this group at
 http://groups.google.com/group/h2-database?hl=en.



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



H2 unable to parse a valid ISO datetime format

2011-10-26 Thread Thomas Mueller
Hi,

 I also had the same problem with GMT time e.g 'z',
 instead of a offset - it didn't seem limited just to -05:00.

Yes, I also saw that. The problem is now be fixed in the trunk and in the
latest jar file (available in the download page).

Regards,
Thomas

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



Modifying SQL grammar

2011-10-26 Thread Martin
I'm trying to use H2 with a legacy MS SQL application using 'FOR XML
AUTO'.  I've put together a xml-auto function to reprocess into sql
result set into formatted xml but I wanted to modify the sql grammar
so it would be processed automatically.  How feasible is it to do
this?

Thanks,

Martin

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



Re: closing embedded database with DB_CLOSE_DELAY=-1

2011-10-26 Thread Adam McMahon
Hi,

Thomas: your suggestion to use the sql shutdown command worked great

Thotheolh: I guess my question was a bit off, because I thought I
would need an api call, but as it turns out the shutdown sql
statement worked fine.  To describe my situation.  I am using embedded
H2 in tomcat.  When I would shut down tomcat (using the tomcat
shutdown.sh command) it would give me the warning that and H2 thread
has failed to stop, it would also give me this warning upon a
redeployment.  I simply needed to add the sql shutdown command at an
appropriate place within my servlets to explicitly tell H2 to just
down.  Do you think this was not necessary?  Should I not have to do
this?

Thanks,

-Adam

On Oct 25, 11:10 pm, Thomas Mueller thomas.tom.muel...@gmail.com
wrote:
 Hi,

 To close the database, execute the SQL statement SHUTDOWN
 (Statement.execute(SHUTDOWN)).

 Regards,
 Thomas







 On Wednesday, October 26, 2011, Adam McMahon wrote:
  Hi everyone,

  I am using an embedded Database with DB_CLOSE_DELAY=-1.  I could not
  find a simple way to close this type of database from within Java
  code.

  I would like H2 to be able to close a bit more graceful, currently I
  am getting the tomcat warning: appears to have started a thread named
  [H2 File Lock Watchdog /home/adam/mydb.lock.db] but has failed to stop
  it.

  I do not want to make the Database a resource that is handled by
  tomcat, but I would like to open and close it via code.  Of course
  opening it is easy, but can't figure out how to close it when I want
  to.

  Thanks,

  -Adam

  --
  You received this message because you are subscribed to the Google Groups
  H2 Database group.
  To post to this group, send email to 
  h2-database@googlegroups.comjavascript:;
  .
  To unsubscribe from this group, send email to
  h2-database+unsubscr...@googlegroups.com javascript:;.
  For more options, visit this group at
 http://groups.google.com/group/h2-database?hl=en.

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



Re: BindAddress via JDBC

2011-10-26 Thread Thomas Mueller
Hi,

I see... I guess in this case there is no other way than to manually set the
address. It's a bit unfortunate, maybe it could be solved in some way. If
somebody has an idea - patches are always welcome.

Regards,
Thomas

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



Re: Native threads and also some jvm options

2011-10-26 Thread Thomas Mueller
Hi,

Maybe you should ask somewhere else, for example on StackOverflow. Or
(possibly) even easier, try it yourself.

Regards,
Thomas

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



Re: H2 spatial support without using LGPL libraries

2011-10-26 Thread Peter Yuill

Hi Wes,


We'd like to introduce native database spatial types and functions in
our ISV ERM products.  Our initial plans are just to store points and
polygons, and do proximity searches and contains searches.  Oracle,
SQL Server and DB2 all support this, but H2 does only with add-ons
that, as far as I can tell, are LGPL licensed.  We are now avoiding
LGPL licensed jars in our delivered products.  We are okay with Apache
licenses.


The main reason that add-ons like hatbox are LGPL is that they rely on 
the JTS Topology Suite for the geometry heavy lifting (eg point in 
polygon) and JTS is LGPL. JTS took a long time and some very bright 
geospatial minds to create, so it's difficult to find anyone keen to 
start again. The one realistic option is OpenMap from 
http://openmap.bbn.com . OpenMap is distributed under its own open 
source license (http://openmap.bbn.com/license.html) that bears some 
resemblance to the apache license.


Regards,
Peter

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