Alex Rivera | Logout

How to make a database listener with java?

Asked 2011-01-04T14:57:28.190
15

Greetings all I want to do something like a trigger or a listener (I don't know what) that will listen on a specific database table, and with each new record inserted on this table, do some java code, I mean that it detects that a new record was inserted and get it's data if it's possible I need some guide about how this process can be accomplished ?

I am using Spring-Hibernate-PostgreSQL

Edit
Report

1 Answer

1

I assume you mean that the DB content is added through your hibernate code.

If so, consult this previous answer of mine for how to set up Hibernate Event Listeners with Spring.

Otherwise, a-horse-with-no-name's answer should be best.

answered 2011-01-04T15:06:59.350

Your Answer