-->
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.  [ 6 posts ] 
Author Message
 Post subject: Object cannot be flushed into database,here is debug info
PostPosted: Sun Sep 28, 2003 10:43 pm 
Newbie

Joined: Tue Aug 26, 2003 7:56 am
Posts: 4
Location: Chongqing,China
10:26:39,484 DEBUG EntityPersister:617 - Updating entity: webmail.po.system.GroupData#20
10:26:39,484 DEBUG BatcherImpl:166 - about to open: 0 open PreparedStatements, 0 open ResultSets
10:26:39,484 DEBUG SessionFactoryImpl:526 - prepared statement get: update sys_groups set DESCRIPTION=?, GROUP_NAME=?, QUOTA=?, GROUP_FEE=?, MEGA_FEE=? where GROUP_ID=?
10:26:39,484 DEBUG SessionFactoryImpl:536 - preparing statement
10:26:39,500 DEBUG EntityPersister:366 - Dehydrating entity: webmail.po.system.GroupData#20
10:26:39,500 DEBUG StringType:44 - binding 'test' to parameter: 1
10:26:39,500 DEBUG StringType:44 - binding 'test1' to parameter: 2
10:26:39,500 DEBUG IntegerType:44 - binding '100' to parameter: 3
10:26:39,500 DEBUG DoubleType:44 - binding '0.0' to parameter: 4
10:26:39,500 DEBUG DoubleType:44 - binding '0.0' to parameter: 5
10:26:39,500 DEBUG LongType:44 - binding '20' to parameter: 6
10:26:39,500 DEBUG BatcherImpl:24 - Adding to batch
10:26:39,500 DEBUG BatcherImpl:46 - Executing batch size: 1
10:26:39,531 DEBUG BatcherImpl:173 - done closing: 0 open PreparedStatements, 0 open ResultSets
10:26:39,531 DEBUG SessionFactoryImpl:554 - closing statement


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 29, 2003 9:08 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Are you committing a transaction? If using Hibernate transactions, be sure to call transaction.commit() after calling session.flush(). If using JTA, are you certain that the datasource is under JTA control and that that transaction is being committed?


Top
 Profile  
 
 Post subject: from roller0.9.8,i can't find commit()
PostPosted: Mon Sep 29, 2003 9:39 am 
Newbie

Joined: Tue Aug 26, 2003 7:56 am
Posts: 4
Location: Chongqing,China
from roller0.9.8,i can't find commit()


public PersistentObject storePersistentObject(PersistentObject obj)
throws RollerException
{

Session ses = getSession();
try
{
ses.saveOrUpdate(obj);
}
catch (HibernateException e)
{
throw new RollerException(msg,e);
}
return obj;
}


Top
 Profile  
 
 Post subject: Anyone can tell me where can i find commit() in roller0.9.8?
PostPosted: Mon Sep 29, 2003 9:42 am 
Newbie

Joined: Tue Aug 26, 2003 7:56 am
Posts: 4
Location: Chongqing,China
Anyone can tell me where can i find commit() in roller0.9.8?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 09, 2003 11:05 am 
Regular
Regular

Joined: Mon Sep 08, 2003 10:05 am
Posts: 50
Location: Dublin, Ireland
steve wrote:
If using JTA, are you certain that the datasource is under JTA control and that that transaction is being committed?


My question is:

How do u ensure that a datasource is under JTA control??
My environment: JBoss 3.2.2RC4 with embedded Tomcat

Note that I'm manually creating the datasource with DBCP, and binding it to JNDI, where Hibernate is picking it up..

My issue is that I wan to use JTA, but when I do a commit on the JTA UserTransaction, the Hibernate data does not get committed (the tran is left open on the database).

Any ideas??

Thanks

Colm


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 09, 2003 11:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Thats a question probably better asked of the JBoss folks. I don't use JBoss, and so am not sure how you register a Datasource as JTA transactional.

Typically (in generic terms) you usually have to define a datasource (the resource manager) in the context and then tell the transaction manager to control transactions for that resource manager. What that equates to in pratical steps varies widely by managed environment.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.