The stateful session bean is tied to the client for as long as the client
uses it until the client decides to remove it, or
until a timeout happens, or the server crashes. The remove isn't guaranteed
to be called by the EJB Container (sec. 6.6.3) so,
an async gc may be needed.
Also, AFAIK, a resultset requires an open connection to the DB. If you use
the result-set directly after a query, then you'll
have an open connection for each client that's querying, and that's not just
inefficient, but will eat up all the resources in your
DB host before even reaching 20 clients.
Consider caching data or perhaps re running the query every time.
My 2c,
JP
-----Original Message-----
From: Chris Brown [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 28, 2000 12:50 PM
To: [EMAIL PROTECTED]
Subject: Statefull session bean to handle queries
Has anyone had success with or have suggestions on the following?
Use a statefull session bean to handle queries from a client (servlet). The
statefull session bean will create and hold on to the resultset on behalf of
the client. The client controls the display of "result pages" to the user
and calls methods on the statefull session bean to move through the
resultset. The results are passed back to the client as a collection of
"state" objects. The servlet will store a handle to the session bean in the
session.
Concerns:
Is this the proper design?
How long is the statefull session bean tied to the client?
Passivate/Activate - will the resultset be serialized/deserialized properly?
Can it handle large result sets? 20,000+ rows?
Thanks in advance,
Chris
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".