|
Thanks for everyone's input. The original "can this be done" question may not be possible. I was just posing the question. As for whether or not the app can be run on the iSeries, yes - it certainly could. That was the original reason for writing it in Java. However, the first iteration which was done over a year ago was painfully, and I mean painfully, slow when run on the iSeries. That was the reason for moving it to a WinTel box. The WinTel box easily saw a 10,000% (not exaggeration) improvement in speed. Because of the time crunch to get this into production at the time, we didn't investigate why it was so slow in the iSeries and so much quicker on a WinTel box, it just was. So for the past year it has been running this way. I have now had an opportunity to revisit this application and do some major overhauling. I have not tried running the new version on the iSeries, although this is something I suspect I may do soon. It would be interesting to see if we still have the slowness over there. I have also revisited how I am opening/closing the JDBC connections. I have gone from over 4000 down to 8 (big improvement). However, in doing so, I have bumped into the "java.sql.SQLException: Limit on number of statements exceeded. at com.ibm.as400.access.JDError.throwSQLException(JDError.java:406)" error as mentioned in a previous post. For the life of me I can't figure out why I keep getting this. I open the connection the first time the "PersistData" class gets called and the connection gets stored as a property of the class. Each method in the class has access to the connection. Each method creates it's own callableStatement to use with the connection. After each cs.execute() I call cs.close() so this *should* clear out the statement, but it seems that's not the case. According to the docs there can be up to 9999 open statements before she blows, but it appears I have executed many more statements than that, however, I don't know exactly how many statements have been called before it barfs. As a side note, when I created a new connection each time any of the methods in PersistData needed one, I never ran into the "max statement" error (just 4000+ open/closes). So it seems it has to do with leaving the connection open and reusing it vs. opening a new connection each time. Anybody have a suggestion as to why the close() doesn't appear to cleaning up the connection? Kelly -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of NGay@xxxxxxxxxxxxx Sent: Friday, April 28, 2006 4:58 AM To: Java Programming on and around the iSeries / AS400 Subject: Re: Passing Java Object to iSeries Kelly, Is there a particular reason why you have to run this on a WinTel box? If its Java app and so could be moved, and its pulling data from and writing data to the iSeries, then the best place to run it is on the iSeries - at least then you'll eliminate slowdowns due to the network traffic, and the fact that you're opening 4,000 connections would probably have less of an impact too. Equally if this isn't directly possible (say, your app needs a GUI, or some Windows DLLs), then I'd write your "something" on the iSeries to accept the data stream and write it out to tables in Java too, that way opening up the network connection between the two programs and shoving Java objects down it is pretty straightforward. Regards, Nigel Gay, Computer Patent Annuities. ************************************************************************ ******** The information in this message is confidential and may be legally privileged. It is intended solely for the addressee; access to this email by anyone else is unauthorised. If you are not the intended recipient: (1) you are kindly requested to return a copy of this message to the sender indicating that you have received it in error, and to destroy the received copy; and (2) any disclosure or distribution of this message, as well as any action taken or omitted to be taken in reliance on its content, is prohibited and may be unlawful. ************************************************************************ ******** -- This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx 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 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.