There is already cluster functionality in H2 which you could in theory re-purpose.
But it would require doing some hacking some inside the code.

I suspect you'd be best off with a hook in Session#commit().


On 2012-12-17 09:41, [email protected] wrote:
Hi,

We would like to implement an asynchronous (0.1 - 1s delay) data warehouse attached to a H2 database.

How can we listen to all database modifications? Capturing schema changes would be nice, but only row changes are required.

We already see the following approaches:

1. Using Triggers.
Pro: standard interface
Contra: fired before transaction commits, thus transaction handling might cause some headache, need to generate SQL to wire up triggers

2. Attaching to Transaction Log
Pro: no changes to H2 needed
Contra: hard to parse

3. Hook into Session.commit()
Pro: data in the required format, just when it's commited, only one place to hook in
Contra: H2 needs to be patched (maintenance)

Did we miss an approach? Do you have any additional points on which way to go?

Cheers

Ruedi Steinmann

--
ruedi.steinmann <nospam> ergon.ch  +41 44 268 83 65
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
______________________________________________________________
e r g o n    smart people - smart software

--
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/-/A4J02lFIQrwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]. 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to