Re: closing old connections from h2 console
Hi, The db_close_delay is a delay and should do what you are looking for. For example db_close_delay=10 will close the database if there are no open connections for 10 seconds. See also http://h2database.com/html/grammar.html?highlight=DB_CLOSE_DELAYsearch=db_close#set_db_close_delay Regards, Thomas On Thu, Sep 27, 2012 at 3:28 PM, Adam McMahon a...@cs.miami.edu wrote: Hi, I am using H2 embedded in a web app with db_close_delay=-1. The code in my app closes connections fine. However, on occasion we use the h2 web console to manage things. Since it is in a web browser, on occasion we close the browser while forgetting to hit the disconnect button (I know, human error... but we are used to simply closing browsers when we are done with them). This leaves a few connections that seem to stick around for a while. Is there a way I can run either a function or sql command to clean up connections that have been around for a period of time? Another possible idea is to add an onUnload event to the console html that send a quick ping to servlet to close the connection. I might just add this if there is not a good solution. -Adam -- You received this message because you are subscribed to the Google Groups H2 Database group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/1_xsS7F2vqkJ. 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. -- 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: Please add support for BIGSERIAL columns
Hi, So BIGSERIAL would be simply another word for AUTO_INCREMENT? http://h2database.com/html/grammar.html#column_definition Sure, I can do that. Regards, Thomas On Wed, Sep 26, 2012 at 7:31 PM, Daniel Serodio dsero...@gmail.com wrote: To improve the PostgreSQL compatibility, please add support for the BIGSERIAL type: a BIGINT column with the default values automatically assigned from a sequence. Thanks in advance, Daniel Serodio -- You received this message because you are subscribed to the Google Groups H2 Database group. To view this discussion on the web visit https://groups.google.com/d/msg/h2-database/-/8lHFaF4kas4J. 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. -- 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: Cannot get connection
Hi, * jdbc:h2:h2/jplaydb *doesn`t work at all! It should create the folder and the database under user.dir as in prevoius H2 versions, I guess. No hope! Here is when I get the connection null. In this case, the database file should be created relative to the current working directory (see the docs), not relative to the user.dir. This always was the case for H2 (even in older versions). However, there is an exception if you use the system property h2.baseDir, in this case it is created relative to this directory. But in any case the connection returned by DriverManager is not null; either it works or it throws an exception (for me). 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: Cannot get connection
Hi, According to JavaSE Javadocs: http://docs.oracle.com/javase/7/docs/api/java/lang/System.html user.dir User's current working directory so I don't quite understand why you seem to distinguish between them. Either case, I still do not understand why it works as expected under 166 and before, and fails under 168/169 It looks like either a bug in those later versions, or a behaviour change in the H2 specs. I will try asap that h2.baseDir system property I wasn't aware of until now, and see what happens. Regards, Carlos 2012/9/30 Thomas Mueller thomas.tom.muel...@gmail.com Hi, * jdbc:h2:h2/jplaydb *doesn`t work at all! It should create the folder and the database under user.dir as in prevoius H2 versions, I guess. No hope! Here is when I get the connection null. In this case, the database file should be created relative to the current working directory (see the docs), not relative to the user.dir. This always was the case for H2 (even in older versions). However, there is an exception if you use the system property h2.baseDir, in this case it is created relative to this directory. But in any case the connection returned by DriverManager is not null; either it works or it throws an exception (for me). 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. -- Carlos Hoces jPlay project http://www.javaforge.com/project/jplay -- 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.