Hi, I'm developing a
Java Based Web Application, in this application, I have several pages that insert and read information from a DB2 database located in a AS400 Server (730, I think), my problem is that when several pages are opened to access the same table, some of them throw an SQL Exception just with the explanation: "Could not register driver" and do not show any information. I am not using Resultsets, just executing SQL sentences over a Statement object, is there a problem with several querys at the same time?, I'ts my first time with Java & AS400 DB2, and I'm really confused about it, this is part of the code:
DriverManager.setLoginTimeout(600);
Connection cn = DriverManager.getConnection(url, usr, pwd);
String query ="SELECT ... ";
Statement st = cn.createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE);
st.setFetchSize(25);
rs = st.executeQuery(query);
I don't know what's happening, when I access several pages one after another it works Ok, but when all of them try to read (not update) the same information at the same time, some of them throw error.
is it possible that the AS400 server is denying connection to the database because of the number of open connections?. Each page has it's own Instance of st,cn,rs, etc.
Thnx.
P.S. Sorry if I'm not specific enough, my english is not very good, if you did understand anything about what I just wrote, please write to
[email protected] , thanks a lot.