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

Francesco (JIRA) noreply at atlassian.com
Fri Nov 20 04:52:08 EST 2009


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

Francesco commented on HHH-1361:
--------------------------------

The problem doesn't seems resolved... looking at 3.2.6ga I still see the old behaviour.

Probably oracle dialects should be changed, as noted above, adding:

    public boolean performTemporaryTableDDLInIsolation() {
        return true;
    }

here you can find a better description of the oracle weird commit (look at "Creating Strored Procedures"):

http://beehive.apache.org/docs/1.0.2/system-controls/jdbc/guide.html

> 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