Details
Assignee
Michael OffnerMichael OffnerReporter
Michael Born @ OrtusMichael Born @ OrtusLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
New
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Michael Born @ Ortus
Michael Born @ OrtusLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
Created 2 September 2022 at 18:16
Updated 7 September 2022 at 07:41
The new
isWithinTransaction()
method will only detect atransaction{}
construct created in Lucee, and fails to returntrue
when there is an underlying Hibernate transaction.For example:
// start a Hibernate transaction early in the request. tx = ormGetSession().beginTransaction(); // later in the request... if ( !isWithinTransaction() ){ transaction{ entityNew( "Person" ); } }
This throws “Transaction not successfully started” because there is already an ongoing Hibernate transaction.
This method needs to support detecting an underlying Hibernate transaction which may have been created from a custom transaction manager. (Such as for working around LDEV-4017, or using a transaction wrapper in CBORM).