Set a limit on the number of records you are willing to keep in memory.
once that limit hits, switch to querying the DB.
Choose the right limit will help your sites performance.
> -----Original Message-----
> From: Rich Diaz [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 23, 2001 2:16 PM
> To: [EMAIL PROTECTED]
> Subject: when to query vs when to use a 'model' bean?
>
>
> I'm kinda new to JSP and I'm making an application that will
> access a database
> to render most of my jps pages.
>
> Using MVC of course:
>
> Models: (beans of retrieved data)
> Views: (jsp)
> Controllers: (servlet to get data)
>
> I'm wondering where is the line when I should just re-query
> the database vs
> storing a database query in a bean? (beans taking up server memory).
>
> I don't want to keep querying the database vs storing a
> common query result in
> a bean for all my users (request) to use.
>
> thanks, and hope this made sense ;)
>
> Rich
>
>
> ____________________________________________________________________
> Get free email and a permanent address at
> http://www.netaddress.com/?N=1
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets