-->
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.  [ 9 posts ] 
Author Message
 Post subject: program hangs when transaction do commit
PostPosted: Wed Nov 30, 2005 11:54 pm 
Beginner
Beginner

Joined: Tue Nov 01, 2005 5:21 am
Posts: 24
Hi,

after I save an object and do transaction commit, the program hangs. Then restart the program does not work. I have to restart the os system to solve the problem.

Could anyone tell me what's wrong and how to solve this.

Thanks in advance.

Yulei


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2005 1:54 am 
Senior
Senior

Joined: Tue Aug 23, 2005 8:52 am
Posts: 181
Not much information from the original issue.
What DB? OS? Can you show some code where you commit?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 02, 2005 3:06 am 
Beginner
Beginner

Joined: Tue Nov 01, 2005 5:21 am
Posts: 24
DB: oracle9
OS: windows2000

code:

NewObject o = new NewObject("a");

Session session = HibernateUtil.currentSession();

Transaction trans = session.createTransaction();

session.save(o);

trans.commit();

session.close().


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 02, 2005 3:17 am 
Beginner
Beginner

Joined: Tue Nov 01, 2005 5:21 am
Posts: 24
And, those statements sometimes work well, and sometimes they hangs at trans.commit()


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 02, 2005 4:48 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
I do not think forum can help to debug this stuff without information, "Something sometimes hungs" is not a information to solve a problem. Try tools to debug application, JVM, DB, OS.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 05, 2005 4:23 am 
Beginner
Beginner

Joined: Tue Nov 01, 2005 5:21 am
Posts: 24
It seems that when I open an db tool(sybaseToad), and connect it to DB, then the program might hangs at trans.commit(). Sometimes when I exit the db tool, the programs can goes on. Could anyone tells me what's wrong? I can not prevent my application user to use a DB tool while running my application. What to do to solve this?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 05, 2005 4:28 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
take this up w/ the sybaseToad vendor. sounds like it is not releasing a lock.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 05, 2005 4:43 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
or force commit with your tool... learn how it works

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 06, 2005 4:42 am 
Beginner
Beginner

Joined: Tue Nov 01, 2005 5:21 am
Posts: 24
which tool can i use to close the connection?


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