entitylisteners Questions

17

I am trying to inject a Spring dependency into an JPA EntityListener. Here is my listener class: @Configurable(autowire = Autowire.BY_TYPE, dependencyCheck = true) public class PliListener { @Au...

2

I am using JPA with Hibernate as the implementation in my Spring webapp. I use EntityListeners for auditing (Spring-data) and other notification purposes. In general it works fine. However, when c...
Mcgean asked 12/6, 2013 at 10:31

5

Solved

I am trying to get Spring active profile in JPA Entity Listener using System.getproperty("spring.profiles.active"). But it is always returning Null profile. However I have checked on server and pro...
Gardiner asked 15/1, 2019 at 13:45

1

Solved

I am facing dependency cycle in my following design (taken from here). I have 2 entities Post and PostLog. When Post is created, I want to persist it in PostLog as well. So created listener and app...
Beverlybevers asked 21/2, 2021 at 16:41

3

I am integrating Spring4 and Hibernate5, but there is a problem that I can't resolve. I use @EntityListener annotation on the BaseEntity class that is a super class for other business model. Also I...
Hydrolyze asked 17/6, 2017 at 8:11

2

Solved

I use @EntityListeners to make operations before I save in my Db and after I load. Inside my Listener class I make a call to an Ecryptor (which needs to fetch info from configuration file), so the ...

3

I need to make an audit module to my Java Web App. I use EclipseLink, not Hibernate (can't use Envers). I searched a lot some way to get the SQL or JPQL that JPA is executing, so I could log someth...
Shanleigh asked 13/10, 2011 at 14:9

2

Solved

Entity listeners are commonly placed over respective entity classes such as, @Entity @EntityListeners(EntityListener.class) public class Entity implements Serializable { //... } Applications m...
Cumshaw asked 18/9, 2015 at 12:46

0

I am having a strange problem with a custom jpa-entity listener I've created in a spring boot application. I'm trying to use Springs @Configurable mechanism to configure the EntityListener (as seen...
Encephalogram asked 3/7, 2015 at 11:33

3

Solved

I have a RESTful API that makes use of an entity class annotated with @EntityListners. And in the EntityListner.java, I have a method annotated with @PostPersist. So, when that event fires, I want ...
Synovitis asked 28/10, 2012 at 8:19

1

Solved

I've got a Hibernate 4 / Spring MVC 3.2.4/ Spring Data 1.4.1 with Spring Security application in which I am trying to integrate EventListeners on my entity classes. I think I have everything config...
Olivares asked 12/3, 2014 at 4:7

1

Solved

Folks! If I define an Entity Class and annotate it with @MappedSuperclass and an @EntityListener, does the listener also get called for lifecycle events within a child class? Example: @MappedSup...
Cripps asked 29/10, 2011 at 3:55

3

Solved

I'm trying to leverage EntityListener objects and callback methods within my Seam/Hibernate/JPA application. I'm using a Seam 2.2-managed persistence context on JBoss 5.1 with PostgreSQL 9.1 on the...
Gaspard asked 4/12, 2011 at 3:25
1

© 2022 - 2024 — McMap. All rights reserved.