× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: File Lock Problem
  • From: "Vijosh A." <vijosh@xxxxxxxxxxxx>
  • Date: Wed, 20 Dec 2000 12:45:15 +0530
  • Importance: Normal

Thanks Vijay/Madhavan. Your solution works.

One problem still exists. I make one connection for the entire application
by globally declaring the Connection variable. So I can close it at
application exit point. What happens is that if a database file is accessed
for  insert/update, wrkobjlck shows the following -


 Opt   Job          User         Lock      Status          Scope     Thread
       QZDASOINIT   QUSER        *SHRRD     HELD           *JOB


Even if I close all the prepare and resultsets, still this remains. Of
course unlike the earlier state, it does not keep on increasing. My thinking
is that, when the first time a prepare statement is executed the database
manager creates a pointer to the table which is attached to the connection
pointer. All prepare statements and resultsets created subsequently are
attached to this table pointer. So when we close prepare statements and
resultsets all these pointers created gets closed, but the table pointer
remains open. Probably what I need is a way of closing this table pointer
keeping the connection pointer alive.

Please do correct me if my thinking is wrong.

Is there a way of removing this file lock after the user exits from the
program? At the moment even after exiting from the program, the lock
remains.


Thanks

Cheers
Vijosh


-----Original Message-----
From: owner-java400-l@midrange.com
[mailto:owner-java400-l@midrange.com]On Behalf Of vijayakumar
purushothaman
Sent: Wednesday, December 20, 2000 3:25 AM
To: JAVA400-L@midrange.com
Subject: Re: File Lock Problem


check whether all the resources you used were released. It means you should
close statement, result set, and importantly connection objects. Each and
every system has some limitation in creation of connection objects and if
you use some application server like weblogic, you can explicitly fix the
number of connection objects. Ensure that the following code is present in
your program. Hope this will help you. Please drop your feedback.

Vijay.

finally{
try{
         if(con != null) con.close();
         if(statement != null) statement.close();
         if(resultset != null) resultset.close();
    }catch(SQLException sqle) {}
}

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---



--------------------------------------------------------------
Systems & Software, Mumbai, India
  
     Sent using "The PostMaster" by QuantumLink Communications
   
   One Internet account, unlimited personal e-mail addresses
Get your free copy of "The PostMaster" at http://www.qlcomm.com/ 


+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.