Hi Dennis,

This topic has been discussed before, here on the user group:
https://groups.google.com/forum/?fromgroups=#!searchin/jooq-user/notify/jooq-user/SgcSM1EgQsA/bRxtsk_VPAQJ

In general, I'm a bit reluctant of adding support for triggers written in
Java, as there are too many ways to bypass them. You have mentioned plain
SQL, but there is also batch SQL, direct JDBC access, other applications,
stored procedures, and many other means to access the database. If you're
lucky and you're using Postgres or Oracle, you can profit from their
notification mechanisms:
http://stackoverflow.com/a/12619031/521799

Some other, interesting thoughts were written by Adam Gent in the same
Stack Overflow question:
http://stackoverflow.com/a/13240582/521799

Other than that, your safest bet right now is to implement
ExecutionListeners and be sure that all SQL is always generated by jOOQ
through one of the various org.jooq.Query subtypes.

Cheers
Lukas


2013/3/11 <[email protected]>

> Hello,
>
> I've taken a look at jooq now and it looks like what I need.
> However - my application has a UI and needs to get notified about database
> changes: insert, update and delete queries.
> I didn't find anything documented to this  - the only listener I've found
> was the so called ExcutionListener - which seems not to be what I'm looking
> for.
> Is this "feature" even supported directly in jooq?
>
> Otherwise - I'll probably extend the generated DAOs and add my custom
> "Event-Callbacks" in there. The big downside which comes to my mind:
> I can't react on plain SQL queries and I can't react on delete by ID
> calls. Additionally I'd have to add this event features to all DAOs which
> would result in redundant code.
>
> Anything I'm overlooking?
>
> Regards,
> Dennis Fischer
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to