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



Regarding Result Sets from Stored Procedures and JDBC Native Driver, this is
where I obtained this information from:
http://www.as400.ibm.com/developer/jdbc/Faqs/JDBCFAQ.html#F8

Your right: it does refer specifically to accessing remote systems.
Apologies for this.

I believe my statement about the Toolbox issues still stand, though.

Chris Jewell

-----Original Message-----
From: java400-l-admin@midrange.com
[mailto:java400-l-admin@midrange.com]On Behalf Of Richard Dettinger
Sent: Wednesday, October 03, 2001 9:52 AM
To: java400-l@midrange.com
Subject: RE: Stored procedure and close connection



Re:  unfortunately the native AS/400 'DB2' driver does not support this
feature at all!

Just a statement of clarification... the native JDBC driver has no known
problems with ResultSets or multiple ResultSets but when you
go to a remote system over DRDA, it is DRDA that can't support the SQL
cursors.  If there was something that could be done at the
JDBC level, we would do it but this really has to do with system level
components and is beyond our control.  If I'm not understanding
some aspect of what you think is not support, please send me e-mail
outlining exactly what doesn't work.

Regards,

Richard D. Dettinger
AS/400 Java Data Access Team

"Biologists have a special word for stability -- dead"

                Larry Wall
                Open Source Developers Journal
                Issue 1, Jan  2000


"Christopher J. Jewell \(Jewell Consulting Inc.\)"
<jewellcj@jewellconsult.com>@midrange.com on 10/03/2001 11:38:02 AM

Please respond to java400-l@midrange.com

Sent by:  java400-l-admin@midrange.com


To:   <java400-l@midrange.com>
cc:
Subject:  RE: Stored procedure and close connection



I have had just this kind of problem recently with stored procedures
returning SQL result sets and the AS/400 ToolBox JDBC Driver (unfortunately
the native AS/400 'DB2' driver does not support this feature at all!).

It seems that while Connection is threadsafe, Statement and ResultSets
(cursors) are not.
See http://www-1.ibm.com/servers/eserver/iseries/toolbox/faqjdbc.htm#faqB4

Thye solution is to use 'synchronized' in all relevant places.

The strange thing is that I believe I did not have this issue when my code
was installed on another AS/400. Unfortunately I do not have access to that
box now, so I am unable to compare OS/400, Toolbox PTF levels.

Hope this helps.

Chris Jewell
mailto:jewellcj@jewellconsult.com


-----Original Message-----
From: java400-l-admin@midrange.com
[mailto:java400-l-admin@midrange.com]On Behalf Of DUCRET Gilles (GVA)
Sent: Wednesday, October 03, 2001 3:16 AM
To: JAVA400-L (E-mail)
Subject: Stored procedure and close connection


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 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.
**********************************************************************
_______________________________________________
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 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 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.




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.