> To unsubscribe from this group, send email to h2-database+unsubscribe@googlegroups.com.
> The DatabaseEventListener notifications run on the database server thread.
Yes, I think that's fine.
> A consequence is that an API user might inadvertently write code that causes
> delays to the query.
That's his problem. Maybe he actually wants to delay the query.
> So I propose also making the calls
> to DatabaseEventListener.setProgress run using a dedicated Executor.
No, I think that's not necessary.
> Shall I make the notifications asynchronous?
No, please not. If such a feature is required, the
DatabaseEventListener implementation could process this
asynchronously. Possibly DatabaseEventListener could be stacked. If
that ever is a problem.
Regards,
Thomas
The thing the unnerves me with the database listener is that there is no
way to manage those listeners
with SQL whereas there is such capability with triggers.
And making JMX the only way to do some operations with H2 bewilders me...
Why must we make the life of users so difficult?
Let's make only one way to write hooks into H2 which is implementing a
java interface
and managing the triggering of that interface with SQL (using jdbc as
the communications API).
So basically we would need statements like CREATE DATABASE_LISTENER ... etc.
This is not urgent but the point is that if we implement things in some
consistent way
then the database is easier for users to use.
Additional interfaces can be supported of course to increase
compatibility but only after the basic way
to do things has been implemented.
- Rami
Regards,
Steve