users@glassfish.java.net

Re: closing connections in a disabled jdbc connection pool

From: Trond Strømme <Trond.Stromme_at_Sun.COM>
Date: Fri, 16 Jan 2009 09:45:07 +0100

Thanks Jagadish.
I've created https://glassfish.dev.java.net/issues/show_bug.cgi?id=7054
for the ability to close connections in a pool.
.trond

Jagadish Prasath Ramu wrote:
> Hi Trond,
>
> When you change the driver property of a connection pool, pool will be
> reconfigured and hence all the connections will be destroyed and the
> pool will be initialized again.
> There isn't a straight forward way of killing the connections. [This is
> being proposed]
>
> * You should disable *all* the jdbc-resources that use the pool so as to
> destroy the connections in the pool [This is implementation detail which
> may change in future releases]
> * Probably the right approach will be to recreate (destroy & create) the
> pool.
>
> Thanks,
> -Jagadish
>
>
> On Thu, 2009-01-15 at 21:30 +0100, Trond Strømme wrote:
>
>> Hi Jagadish.
>> I'm uncertain wheter we speak of the same thing, this is not about pool
>> reconfiguration.
>> I simply want to close any connections the pool keeps open.
>>
>> .trond
>> Jagadish Prasath Ramu wrote:
>>
>>> Hi Trond,
>>> Can you try disabling the application, reconfigure the connection pool
>>> and enable the application back ?
>>> As long as no instance of the application component is holding the
>>> reference to the jdbc-resource (DataSource) during pool reconfiguration,
>>> it should work fine.
>>>
>>> Thanks,
>>> -Jagadish
>>>
>>>
>>> On Thu, 2009-01-15 at 12:35 +0100, Trond Strømme wrote:
>>>
>>>
>>>> Hi.
>>>> On GlassFish 2ur2 when I disable a JDBC resource will the connections
>>>> that have been established in the associated the pool remain connected?
>>>>
>>>> For maintenance I'd like to disable the applications utilizing a pool,
>>>> disable the pool and then close all connections in the pool, thus
>>>> freeing the database to be able to change a schema or similar. Currently
>>>> I have to stop glassfish in order to actually close the connections to
>>>> Oracle.
>>>>
>>>> Ideally the functionality, if it does not exist, should be avaliable
>>>> through both the web admin and asadmin. Alternatively if this is
>>>> something that is exposed through an MBean somewhere i can write a small
>>>> script that does this for me.
>>>>
>>>> Thanks,
>>>> Trond Strømme
>>>> Sun Microsystems Scandinavia
>>>> +47 975 09 388
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>