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
More Related Contents:
- Mapping ManyToMany with composite Primary key and Annotation:
- Mapping array with Hibernate
- Array with UserType in Hibernate and PostgreSQL –> MappingException
- Can someone explain mappedBy in JPA and Hibernate?
- Spring Boot – Handle to Hibernate SessionFactory
- How to fetch FetchType.LAZY associations with JPA and Hibernate in a Spring Controller
- When to use EntityManager.find() vs EntityManager.getReference() with JPA
- Unable to get spring boot to automatically create database schema
- Could not serialize object cause of HibernateProxy
- No serializer found for class org.hibernate.proxy.pojo.bytebuddy.ByteBuddyInterceptor
- Exception NoClassDefFoundError for CacheProvider
- Why does Hibernate disable INSERT batching when using an IDENTITY identifier generator
- Postgresql UUID supported by Hibernate?
- Hibernate table not mapped error in HQL query
- Hibernate, iBatis, Java EE or other Java ORM tool
- Hibernate recursive many-to-many association with the same entity
- What is the ‘best’ way to do distributed transactions across multiple databases using Spring and Hibernate
- java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session
- Hibernate-sequence doesn’t exist
- Hibernate use of PostgreSQL sequence does not affect sequence table
- Spring 3.1 Hibernate 4 exception for Inheritance [cannot be cast to org.hibernate.mapping.RootClass]
- Java SE + Spring Data + Hibernate
- JPA Multiple Embedded fields
- Hibernate Criteria for Dates
- how to set header no cache in spring mvc 3 by annotation
- How to rollback a database transaction when testing services with Spring in JUnit?
- Spring Data JPA: How can Query return Non- Entities Objects or List of Objects?
- java.lang.IllegalStateException: No transactional EntityManager available
- FetchMode join makes no difference for ManyToMany relations in spring JPA repositories
- How to find distinct rows with field in list using JPA and Spring?