Hi Chris I stored the result bean in the http request object, NOT IN THE SESSION OBJECT, hoping that once the result is delivered, the beans will die with the request object since request object.
I also called the necessary .close() methods and then set the conn, statement, rs, object itself to null. Do you have better way as how to transport this result to jsp? Please enlighten me. Fyi, I must process and send millions of data since my customers usually run analysis processes from 15 different tables with hundred of thousands of data from each table. It is an analysis of 6 or more months of manufacturing data combined with marketing, purchasing, inventory mutations, pricing, production monitoring etc. As what I meant by exhaustive, I went to the extent of building my own cache scheme and it worked, the process still long, but at least it does not kill the other user, but if two or more user doing the same huge process at the same time it will still consume the server. TIA Rendra GOD is GREAT! -----Original Message----- From: Christopher Schultz <ch...@christopherschultz.net> Date: Thu, 08 Apr 2010 18:12:16 To: Tomcat Users List<users@tomcat.apache.org> Subject: Re: Tomcat scalability setting - need help please -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rendra, On 4/8/2010 12:53 PM, Cin Lung wrote: > Your remark is almost correct. What I did is that I store the result of the > resultset (which can go up to million lines of rows) in a batch of Java > beans. Then I set the beans to the HTTP Request and pass them to the > receiving JSP. This will kill your server every time. It is a bad plan in general and will simply not scale in any way. Consider changing... everything. > But I do remember to return the connection to the pool. Super! > I also try to kill > the statements, result sets, etc by setting them to null. It's better to call [whatever].close(). > But I realize that > java might wait for the memory to be cleared by the garbage collector. If you're storing all that stuff in "beans" in the session, you're toast. > This goes back to my second problem. If the user closes the browser, the > request object form the servlet would lost its way to return the result. And > this will hog the tomcat performance for a while. If you are sending millions of rows to your client, it's no wonder they are closing their web browser. :( - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAku+VMAACgkQ9CaO5/Lv0PBl2wCfa2YlxlZe6uacPKSc2coaji7Y bl8AoKguMz08zZNU/plxn8moq5wLLAZt =wM9J -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org