-->
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.  [ 1 post ] 
Author Message
 Post subject: session terminated unexpectedly
PostPosted: Sun Oct 02, 2005 10:38 am 
Newbie

Joined: Sat Oct 01, 2005 10:10 pm
Posts: 1
This is a strange problem, session is closed unexpectedly. And even worse, I can not reproduce the problem. I am using Websphere 5.0.2, UDB 8.1 and Hibernate 2.0. The process is try to convert a few XML to PDF via FOP and update database with these documents attributes (like, subject, release date etc...). In the code, I opened one session, and one tranaction for this process. To illustrate what I do, here is the main logic:

try {
Session session = HibernateUtil.currentSession();
HibernateUtil.beginTransaction();
loop on docuemtns {
updateSubject(session, docuement);
handleXML(document);//XML docuement manipulation
XML2PDF(docuement);
updateRelease(session, docuemnt)
}
HibernateUtil.commitTransaction();
}catch(Exception e) {
HibenateUtil.rollback();
}finally {
HibernateUtil.closeSession();
}

HibernateUtil implements local thread approach.

When I have considerable docuements to convert to PDF, the session is closed unexpectedly after handleXML(document). This method does not invlove any database operation and any POJO objects, it is pure XML Document manipulation. The wired thing is, if the session is closed for one docuement, I make the process to handle this document only it never failed. And if I repeat the process on the entire document set, it may run successfully or close the session for another document handling. It is totally unpredictable. But any failure does not really roll back the transaction, these updates and inserts are commited!.

Any idea? Thanks in advance.


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

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.