PostRemove being called before entity is actually deleted
---------------------------------------------------------
Key: EJB-272
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-272
Project: Hibernate Entity Manager
Type: Bug
Versions: 3.2.1
Environment: Hibernate 3.2.1GA Entity Manager
Hibernate core 3.2.2 GA
Oracle 9i
Windows XP professional service pack 2
No application server is being used.
Reporter: Paul
I have an EntityListener with a method annotated with postremove. It seems that the
method is being called before the actual entity is deleted from the database. When
configuring log4j with "debug" logging it appears that the method is being
called after the PreparedStatement is created and configured but before executeUpdate() is
called.
I see the following statements in my log file before my listener is called
14:06:27,024 DEBUG AbstractBatcher:476 - preparing statement
14:06:27,024 DEBUG IntegerType:133 - binding '59532' to parameter: 1
My listener is called next. Then, the prepared statement is executed.
This violates the EJB3 spec. The EJB3 spec states "The PostPersist and PostRemove
methods will be invoked after the
database insert and delete operations respectively."
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira