Actually, when using a Datasource, invoking close() on a connection will
simply release the connection back to the pool, available for use upon
another request for a connection.
Thomas, are you invoking close in the finally clause? If not, it is
possible that some exception is occurring preventing the connection from
being closed.
Scot.
Brian Calves wrote:
> Hi Thomas,
>
> 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?
>
> 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.
>
> Sorry if I misunderstood you or I'm out of line.
>
> Best of luck,
> Brian
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Tuesday, January 09, 2001 10:31 AM
> To: [EMAIL PROTECTED]
> Subject: [jBoss-User] Connection Pool Problem
>
>
> It appears that JBoss does not return connections properly to the pool when
> I invoke the close method on them in my ejbs. Therefore my program runs out
> of connections. When all connections are in use, the next ejb just keeps on
> waiting until a connection becomes available which is never since no
> connection is
> returned to the pool. I am wondering whether there is a work-around to this
> problem. If there is not a work-around, does any-one know when the next
> version of JBoss will be released with this problem fixed?
>
> Thank you!
>
> Thomas Kirsch
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> List Help?: [EMAIL PROTECTED]
>
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]