[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-7193) Transaction Rollback not clearing statement batch on Prepared Statement causes issues with statement caching
Steve Ebersole (JIRA)
noreply at atlassian.com
Tue Mar 27 00:00:48 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-7193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole updated HHH-7193:
--------------------------------
Assignee: Steve Ebersole
> Transaction Rollback not clearing statement batch on Prepared Statement causes issues with statement caching
> ------------------------------------------------------------------------------------------------------------
>
> Key: HHH-7193
> URL: https://hibernate.onjira.com/browse/HHH-7193
> Project: Hibernate ORM
> Issue Type: Bug
> Components: core
> Affects Versions: 4.1.1
> Environment: Hibernate 4.1.1 and before
> Any connection provider that allows statement caching (i.e. C3P0)
> Reporter: Shawn Clowater
> Assignee: Steve Ebersole
>
> The AbstractBatchImpl closes the preparedStatement in a finally block but doesn't call clear in the event of a rollback. This can leave the preparedStatment in a weird state if any type of statement caching is being used.
> The issue is easily fixed by adding a clearBatch() call to the statement prior to close. I was previously working around this by implementing my own BatchingBatcherFactory in Hib 3 but the API changed forcing me to look at it again. I figured I might as well provide a global fix.
> I'll add a pull request once I get github sorted.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list