× 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.



This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
I have now found the problem. It was in the code i trusted the more
(live since 1 year).
I tripled checked everything but this code. The use of the
statement was not thread safe.

Nevertheless there is something i'd like to clarify with the
management of a stored procedure on the As400.
My background is not the as400, so there is still some things
i do not know.

When i create a connection to the AS400, as job is created.
When i call a stored procedure with this connection is a new
job created?
What happens when, because of threading problem two calls to two
stored proc a made through the same connection?

Many thanks

Gilles

-----Original Message-----
From: Jim Mason [mailto:JEMason@compuserve.com]
Sent: mercredi, 3. octobre 2001 18:18
To: INTERNET:java400-l@midrange.com
Subject: Stored procedure and close connection


Hi Gilles.

I don't have the answer but do have a few questions on your environment.

1 are you using toolbox or native jdbc driver for a data source?
2 are you using a try | catch | finally construct to ensure:
        stmt and connection is closed in your app thread?
3 have you implemented a destroy method for your servlet or jsp that is
called  to ensure stmt and connection are closed?
4 your callable stmt is a prepared call probably that is cached in the sql
package for reuse
6 what's the transaction isolation level specified on the jdbc connection
settings?
        - maybe the isolation level has an impact on the behavior
        of the datasource, try repeatable read.  Although this
        is a call statement, I don't know if that might impact
        the behavior of the call client....
7 is there a potential problem with sql server mode running or not running
correctly servicing the was job?
        (see db2 as400 joblog)
8 what are the settings for connection timeout vs idle and orphan on the
        was datasource?
        - maybe the 2nd app is getting connected to your callable
        stmt that hasn't been closed and it's connection wasn't closed
        as well...

Thanks...

Jim Mason


Message text written by INTERNET:java400-l@midrange.com
>
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]
Hello everybody,

I have had a strange problem on my system and i am wondering what is
happening when, from the browser we clic on
a new link while a stored procedure is being executed.

Let me explain.

We use WAS3.5 on the AS400, and the IBM Data Access Beans (com.ibm.db.*) in
our java code

I have done the following:

Connected to our system through the internet.

Information have been accessed into our database:
        - Get a connection from the pool
        - Call a stored procedure

Since it was long to get a response, i have decided to clic on another
link.

what is happening with Websphere? What happens to the thread that was
handling my DB request?
At the end of the method that was called i have a try {} finally to make
sure the connection is always returned.

I have this question, because a colleague of mine get connected at the same
time, and got the result of my query !!!
I have checked all my code, it seems to be ok, completely thread safe. It
is
the very first time we have this (since more than 1 year).

So i was wondering if the connection had been released properly or not, and
if the other user could have received my connection.

Is it possible that the connection has been released to the pool and have
been given to the other user, but the stored procedure was still running
(there is no new job with this stored proc). As a result the other user got
my result.

I don't think it hasnot been released because i have this finally in my
code.
I am quite sure that our java code is thread safe (checked and rechecked,
plus ok since more than a year)

Any idea?

Gilles Ducret
Wealth Management Division
IT Architect
Lloyds TSB Bank
Tel: + 41 22 307 31 50
Mob: +41 79 217 21 41


<

_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.


**********************************************************************
This E-mail and any files transmitted with it are confidential
and intended for the exclusive use of the addressee(s) only.
 You should not disclose its contents to any other person.
If you are not the intended recipient please notify the sender
immediately.
**********************************************************************


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.