The problem is the idle connections are mantained for about 2 hours!!, i've looking on the iseries server documentation with no results, aslo i looked for the setTimeout() method on the java.sql.Connection class without success.
Please help me these idle-and-still-open connections are laughing on me!
I know the connectionpool is a better aproach to manage connections, but this time is a programmer-pride issue
I've decided to keep the connection open on the same session as it allows me a better control on the database server: on the as/400 the database service which listens on 8471 port, generates a new job for each new connection; that's why i keep the connection alive along the same session.
I know the connectionpool is a better aproach to manage connections
I think you know the answer. Keeping sessions open for long periods of time is dangerous and doesn't scale well. Either way, you really do need a connection pool. Otherwise, you are trading pride for all sorts of undesirable side effects.
Joined: Oct 10, 2005
Ok Thanks for the light!
I'll try with connectionPool.
Though i'm still unsatisfied as i was not able to find the setTimeout() method on the Connection class.
Hi my friends.. I`m having the same problems, the idle conections to 8471 port in the as400 server are mantained opened for at least 2 hours, even when I used connection.closed(); method to kill them. I�m also using ResultSet object to obtain all the results of my queries. Each new connection generates a new job which expends server memory and making the as400 slower and slower, as new connections are created. My question is.. is there any solution to close them without waiting this time?