-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Websphere Transaction management with Hibernate 2.1.7
PostPosted: Tue Feb 15, 2005 5:42 am 
Newbie

Joined: Mon Feb 14, 2005 12:14 am
Posts: 14
Location: Boston, USA
Hibernate version:2.1.7

Mapping documents:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>
<session-factory>
<!-- properties -->
<property name="connection.datasource">
phoenixAppDS
</property>
<property name="dialect">
net.sf.hibernate.dialect.Oracle9Dialect
</property>
<property name="show_sql">true</property>
<property name="transaction.factory_class">
net.sf.hibernate.transaction.JTATransactionFactory
</property>
<property name="hibernate.transaction.manager_lookup_class">
net.sf.hibernate.transaction.WebSphereTransactionManagerLookup
</property>

<!-- mapping files -->
<mapping resource="UserProfile.hbm.xml"/>
<mapping resource="ClientTypeL1.hbm.xml"/>
</session-factory>
</hibernate-configuration>


Code between sessionFactory.openSession() and session.close():
session.save((ClientTypeL1)orRefData);


Full stack trace of any exception that occurs:

Name and version of the database you are using:Oracle 9i

The generated SQL (show_sql=true):I am not getting the insert sql statement

Hi,
I have an application which uses CMTs. So while saving my entity to the database , i am not starting a trasanction. I don't have any transaction specific code. But i am not able to save my entity to the database. I have read in one of the FAQs that "Hibernate will not execute any SQL until you either call Transaction.commit() (if using the Transaction API) or Session.flush() (if you are not) at the end of a session to flush your in-memory changes to the database." Since i am using CMT, i am not manually committing my transaction. Can somebody help me in this regard. I am using WebSphere 5.0 application server.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 15, 2005 7:00 am 
Newbie

Joined: Mon Feb 14, 2005 12:14 am
Posts: 14
Location: Boston, USA
I resolved this problem using session.flush().


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.