Atomikos Forum

Closing ALL idle connections

When using the AtomikosDataSourceBean you can configure a minimum pool size of 0 connections. One would excpect that after a certain time all connections will be closed. However, this isn't the case... Atomikos keeps one connection out of the pool, which it uses for XA actions such as a prepare. This connection never gets released.

In my situation I have around 500 databases and this atomikos behaviour quickly causes hundreds of idle connections. Is there an easy way to solve this problem?

Right now, I am thinking of proxying the DataSource and closing it after a certain time. I suppose this will also close the connection atomikos is holding onto. Nevertheless I hope there is an easier way...
Evert De Rammelaere Send private email
Thursday, April 22, 2010
 
 
Hi,

Closing the datasource should close those connections too.

As for your request to change the default behavior: I can't answer that right away but I promise we will evaluate it when we have time.

HTH
Guy Pardon Send private email
Thursday, April 22, 2010
 
 
Closing the datasource indeed closes "those" connections. Maybe you should think to always use connections out of the pool, also for "those". Anyway, thanks for the reply.

By the way, I chose to close the DataSource and if needed again I recall init on it. I think this is allowed, or at least it seems to work.
Evert De Rammelaere Send private email
Monday, April 26, 2010
 
 
Closing and re-initing should be fine, like you suggested.

Using the pool to 'get' recovery connections does pose some risks, especially if the pool is exhausted. But we'll check to be sure.

Cheers
Guy Pardon Send private email
Monday, April 26, 2010
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics