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 th
This is what LISTEN/NOTIFY was created for.
The only drawback is that you will need to have some kind of background thread that polls the database on a regular basis to see if any notifications are available.
You can also use the code from the Postgres Wiki to have a starting point
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.
You could add an Interceptor to your Hibernate configuration to detect save events.