SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
42
Originally posted by Jeroen Wenting:
Putting ANY database objects in your session is a VERY bad IDEA indeed.
It will in an environment with even a moderate load very quickly lead to database resource depletion which in turn can cause your entire database server (and as a result your web application) to hang waiting for connections to be freed!
Rather capture the ResultSet data into custom objects which you store in a List of some sorts and work on that.
This is no theoretical problem btw, I've experienced it myself (luckily it wasn't my code or application, though it was affected as it used the same database).
Hans Bergsten, [email protected]<br />Author of O'Reilly's<br />- JavaServer Pages,<br />- JavaServer Faces<br /><a href="http://www.hansbergsten.com/" target="_blank" rel="nofollow">http://www.hansbergsten.com/</a>
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Originally posted by Nicholas Cheung:
Hi Hans,
Thanks for pointing out a feature of JSTL. In the past, when JSTL does not exist, and we are too *lazy* to convert ResultSet into other format of data, we simply try to do the most *convenient* way.
In addition, I would like to know, beside the Result listing, what other JSTL features are new for data presentation?
Seems to me that, JSTL is a similar idea of XSL, while JSTL works with Java Objects and XSL works with XML objects.
Nick.
Hans Bergsten, [email protected]<br />Author of O'Reilly's<br />- JavaServer Pages,<br />- JavaServer Faces<br /><a href="http://www.hansbergsten.com/" target="_blank" rel="nofollow">http://www.hansbergsten.com/</a>
Originally posted by Hans Bergsten:
For an overview of JSTL, you may want to read my articles about JSTL available on http://onjava.com. Search for "Hans Bergsten" to find them, along with other articles I've written about JSP and JSTL.
Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Humans and their filthy friendship brings nothing but trouble. My only solace is this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|