Pablo Aguilar Martínez (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=63847f2...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMjI3NzA4NGJj...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16278?atlOrigin=eyJpIjoiMjI3Nz...
) HHH-16278 (
https://hibernate.atlassian.net/browse/HHH-16278?atlOrigin=eyJpIjoiMjI3Nz...
) The save method of CrudRepository does not persist to the database when called from a
Rabbit event. (
https://hibernate.atlassian.net/browse/HHH-16278?atlOrigin=eyJpIjoiMjI3Nz...
)
Change By: Pablo Aguilar Martínez (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=63847f2...
)
When I call a method that has the save method from a rest controller, the method persists
the entity. However, if I publish an event in rabbit and a microservice listens to that
event that calls a method that has the save method, the entity is not persisted in the
database. If you look at the hibernate logs you can see how calling from the controller
logs the insert, but from the listener there is no log of the insert.
UPDATE:
This bug can be removed. The issue was that we have 2 database in the same project (neo4j
and mysql) and it seems that when the method is called from the listener it does not know
what transaction manager to use.
(
https://hibernate.atlassian.net/browse/HHH-16278#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16278#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100217- sha1:2199b34 )