Hi!

Brian Calves wrote:
> I'm new to jBoss and EJB in general, so please give these suggestions an
> appropriately small degree of trust:
> 
> 1) If you're invoking close() on the connection, aren't you destroying the
> resource that is owned by the pool? I thought the point of the pool was to
> keep open connections open. Therefore, if you're closing them, you'd be
> exhausting all of the resources in the pool?

He's only closing the pooled connection, which is a wrapper, so the
semantics is really "ok, I'm done with this connection, put it back in
the pool".

> 2) Again, I'm a novice, but I think that if one of your beans calls another
> bean, then (depending on your configuration) a single "invocation" could use
> more than one transaction; and possibly more than once connection. So if
> your connection pool is small, you could exhaust your resources that way, as
> well.

Yes, if you have REQUIRES_NEW as transaction attribute, and a fairly
long call-chain, then the pool might be emptied. Which is only a problem
if the pool has a fixed size, but it creates connections as necessary.

/Rickard

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to