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

Tushar (JIRA) noreply at atlassian.com
Mon Sep 11 21:00:25 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1361?page=comments#action_24405 ] 

Tushar commented on HHH-1361:
-----------------------------

Steve, the problem hasn't gone away - transactions are still being committed too early in Hibernate 3.1.3.

Could I please request a change to the Oracle9Dialect to the safest default, because it's quite a show stopper if Hibernate commits early. 

{code}
public class HHH1361Oracle9Dialect extends Oracle9Dialect {

    public boolean dropTemporaryTableAfterUse() {
        return false;
    }

    public boolean performTemporaryTableDDLInIsolation() {
        return true;
    }
}
{code}


> 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: Hibernate3
>         Type: Bug

>   Components: core
>     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