On 27 Sep 00, at 12:37, Rickard Oberg wrote:

> > I'm not quite sure what you mean by this, but...
> >
> > > some while back). This will
> > > a) allow Connections to be gotten in setInitialContext() and reused many
> > > times
> > > b) make it impossible for beans to "steal" connections and not hand them
> > > back
> >
> > ...what if a bean "steals" a connection because it wants to keep a
> > result set open across business method calls, e.g. to implement
> > the "stateful session bean facade as remote scrollable cursor"
> > pattern?  I'm not recommending this architecture (blech), but it's
> > legal.  In this case, you wouldn't want other components reusing
> > this connection, right?
> 
> Not sure. Would it be possible to code ResultSet so that .close does the
> connection return thingy? That should be ok I think.

Hi Rickard,

Yes, that might be a nice solution.  The jBoss Connection would 
have to track open ResultSets.  It draws a connection from the pool 
to support open ResultSets--otherwise it remains a virtual 
connection.

Second question: how should PreparedStatements be managed?  I 
can easily see a component developer using a connection per 
component instance so that he or she can reuse 
PreparedStatements.  We don't necessarily want to draw a 
Connection from the pool just to support this.  Any ideas?

-Dan

> 
> /Rickard
> 
> 
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
> 




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to