[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1361) creating temporary table for bulk delete will commit current transaction in managed environment such as J2EE

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Nov 20 14:55:09 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34706#action_34706 ] 

Steve Ebersole commented on HHH-1361:
-------------------------------------

Again, my issue with this is that my own testing as well as the testing done by Jifeng Liu show this working as-is.  So before I make any further changes I'd like to understand what is different in your server/driver setup that causes you to see different results.

> creating temporary table for bulk delete will commit current transaction in managed environment such as J2EE
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-1361
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1361
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1
>         Environment: J2EE container; Oracle
>            Reporter: Jifeng Liu
>            Assignee: Steve Ebersole
>             Fix For: 3.1.1
>
>         Attachments: hibernate.cfg.xml, stacktrace.txt
>
>
> I have a table mapping with joined-subclass as following. When I execute bulk delete statement: 
> session.createQuery( "delete from Job j where j.status = :status" )
>    .setString( "status", pStatus )
>    .executeUpdate()
> Hibernate will automatically create a temporary table called HT_Job to store job ids. This will cause current database transaction committed. Because I am using J2EE container managed transaction (CMT), this commit behavior is not good. And I also lose opportunity to rollback the transaction.
>         <class name="com.senior.bll.shared.jobs.Job" 
>             table="job" rowid="rowid">
> 			<id name="id" column="job_id"/>
> 			<version name="updateDateTime" column="update_date_time" type="oracle_date"></version>
> 			<property name="type" column="job_type"/>
> 			<joined-subclass name="com.senior.bll.entity.constituent.messaging.schedules.MessageJob"
> 							 table="message_job_data" >
> 				<key column="job_id" />
> 				<property name="queryId" column="query_id"/>
> 			</joined-subclass>
>         </class>

-- 
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list