Hi, The H2 Console tool stores the settings in a file called ".h2.server.properties" in the current user home directory (Constants.SERVER_PROPERTIES_NAME). If the history is stored, it should probably be stored there. But I'm not sure whether it should be stored; it would be a security problem because the history would be shared across all users I guess. So the history should probably be split into groups, for example by IP address of the client.
Regards, Thomas On Wed, May 28, 2014 at 6:07 PM, Martin Grajcar <[email protected]>wrote: > Thank you for the fast answer. I guess I can do it, the only problem are > the Preferences limitation. There's no way to store WebSession.MAX_HISTORY > = 1000 entries as a single value as there's the Preferences.MAX_VALUE_LENGTH > = 8*1024 limit. Using multiple values gets complicated because of > deletions of duplicates. 1. It could be done trivially by always storing > the whole list, but this is ugly and could possibly take non-negligible > amount of time due to quickly filling FileSystemPreferences.changeLog). > Or not; the thing is rather complicated. 2. Doing some smart node reuse and > re-linking is rather complicated, but doable. 3. Limiting the stored > history to 8 KB would suffice for me. > > So there are three possibilities, which one do you prefer? > > Regards, Martin. > > > On Wed, May 28, 2014 at 4:36 PM, Noel Grandin <[email protected]>wrote: > >> Sounds reasonable to me. >> >> The code you want lives in >> src\main\org\h2\server\web\WebApp.java >> src\main\org\h2\server\web\WebSession.java >> >> search for "@history" and follow the code. >> >> I suspect that the easiest option would be to have the console webapp >> store the history data using the java.util.prefs.Preferences stuff. >> >> >> On 2014-05-28 16:18, Martin Grajcar wrote: >> >>> The console history is a nice feature, but sometimes I get kicked out >>> and have to log in again and the history is gone. >>> >>> I don't know exactly when and why I get kicked out. Is there something I >>> could do about it? >>> >>> I didn't mean the persistency literarily, it's just that I'd love if it >>> could survive such events. Using cookies or >>> browser local storage or whatever... I guess I could do it myself, but >>> first I'd like to know your opinion. Does it make >>> sense? Where to start? >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "H2 Database" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/h2-database. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
