I also didn't read the article, but in my not so humble opinion, this is **
terrible ** advice.   Keeping a database statement (and hence connection)
open for use by a client is just asking for trouble in a network
environment.  First is the pandora's box of possible failure points in the
point-to-point connection.  But even if you have a perfect network, you have
no idea what the caller is going to do with that statement.  He may do
nothing and just sit on it for the next 3 weeks!  I read the other response
to this post, and I don't think allow remote iteration to a collection is a
good idea for similar reasons.  You want to design your system to maximize
robustness, concurrency and performance.  All of these benefit from
finishing a logical unit of work completely in a single method before
returning to the client.  We've opted to serialize our database results into
an xml string, close the db connection (which returns it to the pool) and
then send the xml string back to the client.

----- Original Message -----
From: "Dave, Pragnesh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 4:03 PM
Subject: Re: [JBoss-user] Stateless Session Bean and CallableStatement


> In one the articles at developerworks, Cynthia Saracco actually says that
> wrapping DBMS stored proc under stateless session beans is a "good" idea
and
> passing the Serialized CallableStatement back to the client a better
> approach then creating your own Collection.
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to