Hey!
I would look more closely the order in which you create your db objects.
More mistakes are made in this area of db access by beginners than any other
mistakes.
The error message is telling you that you openned the maximum amount of
connections allowed by the db, as perscribed by the applications parameter
in the db administration. Setting this to a higher value will *not* solve this
problem.
You need to fix your code. Keep trying. You'll get it. <smile>
Sans adieu,
Danny Rubis
Davide Vacca wrote:
> Hello to everybody,
> My problem consist in the accessiong to a SQL DB (DB2) using a Websphere
> server. My application is written in Java language and it executes several
> queries on the DB. Initially everything is OK, i.e. the queries are
> correctly executed when overnight, the queries execution (not the connection
> to the DB) throws the following exception:
>
> "Exception: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] SQL1040N The
> maximum number of applications is already connected to the database.
> SQLSTATE=57030"
>
> I always execute a query in the following way:
> a-)I excute the connection by the method DriveManager.getConnession() (with
> the right parameters).
> b-) I retrieve the statement using the method createStatement() called on
> the connection object
> c-) I execute the query and I retrieve the datas using the object which
> comes from the query statement, as written on the Sun documentation.
> d-) I close, by the close() method, either the connection and the statement
> e-) I execute again the query as I've described above if I need to do
> another query on the DB
>
> I believed it was a problem related to the Websphere server configuration so
> I've tried to set the number of the total connections opened at the same
> time to 100, from 25 as default, without any result.
> I've noticed that the Websphere documentation (the redbooks) is very very
> big, so I'm asking if you would be so kind to tell me in which redbooks I
> have to read in order to deal with this problem.
> Thank you very much in advance for your help.
>
> Vacca Davide
> [EMAIL PROTECTED]
> Methosystem S.r.L.
> Via VIII Marzo Collecchio (PR)
> Italy
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html