-->
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.  [ 3 posts ] 
Author Message
 Post subject: Question related to as400 DB2
PostPosted: Fri Jul 10, 2009 12:31 pm 
Newbie

Joined: Fri Jul 10, 2009 12:15 pm
Posts: 6
HI All, I am new to using hibernate and have a question.

After any CRUD operation, I guess I was expecting hibenate to close the session, which would result in the tables also being closed out...But when I view the connection/job on the as400, the tables remain open in a *SHRRD lock (which basically just prevents the table from being move,deleted,etc..).
Is this normal?..Am I doing something wrong?

Just to provide some additional info:
1. We are not specifically calling session.close(), as I obtain the session from factory using getCurrentSession() prior to each transaction (which I believe handles this automatically?).
2. Journalling is not enabled on the database, so the isolation level is set to 0 (none).

Thanks for any help.
Kevin..


Top
 Profile  
 
 Post subject: Re: Question related to as400 DB2
PostPosted: Fri Jul 10, 2009 4:38 pm 
Beginner
Beginner

Joined: Sun Jun 13, 2004 9:49 pm
Posts: 38
It's the QZDASOINIT job right? These are in subsystem QUSRWRK or QSYSWRK.
If you leave the session open, you will indeed see the Open Data Path (ODP) staying open with a shared read lock.

This is nothing to worry about.

Get the table journalled though. CRTJRNRCV, then CRTJRN and associate the two.
Create the receiver as *SYSTEM managed and delete receivers *YES.

Then use STRJRNPF to journal the file to the journal.

Good luck.


Top
 Profile  
 
 Post subject: Re: Question related to as400 DB2
PostPosted: Fri Jul 10, 2009 4:52 pm 
Newbie

Joined: Fri Jul 10, 2009 12:15 pm
Posts: 6
Thanks for the response Kango.

You are correct..It is job QZDASOINIT in QUSRWRK.
However I thought that I read somewhere (could be wrong) that using the getCurrentSession() method of the sessionfactory handled the session.close() for you automatically. My understanding was that it was only when you called openSession() that you needed to specifically call close().

Maybe I am just misinterpreting something.

Unfortunetaly, journalling is not an option at this point.


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