Subject | Re: [Firebird-Java] Shutdown / Join |
---|---|
Author | Mark Rotteveel |
Post date | 2015-08-26T10:07:03Z |
On Tue, 25 Aug 2015 17:00:57 +0000, "'Steffen Heil (Mailinglisten)'
lists@... [Firebird-Java]" <Firebird-Java@yahoogroups.com>
wrote:
milliseconds or more (see
https://github.com/FirebirdSQL/jaybird/blob/Branch_2_2/src/pool/org/firebirdsql/pool/PooledConnectionQueue.java#L571
), although that is still no guarantee.
Unless you have a very good reason to stay with it, I'd suggest you move
to a third-party connection pool. This class (and everything else in
org.firebirdsql.pool) is going to be removed in Jaybird 3.0.
Mark
lists@... [Firebird-Java]" <Firebird-Java@yahoogroups.com>
wrote:
> Hithe
>
> I am using org.firebirdsql.pool.FBWrappingDataSource.
> When I stop the pool using dataSource.shutdown(); it will stop, but
> IdleRemover thread seems to stay for some time.named
> This leads to a warning in tomcat:
>
> WARNING: The web application [ROOT] appears to have started a thread
> [Pool //127.0.0.1//opt/database/osiris4.fdb idleRemover] but has failedto
> stop it. This is very likely to create a memory leak. Stack trace oforg.firebirdsql.pool.PooledConnectionQueue$IdleRemover.run(PooledConnectionQueue.java:571)
> thread:
> java.lang.Thread.sleep(Native Method)
>
> java.lang.Thread.run(Thread.java:745)do
>
>
> I suspect that happens because the thread has not stopped yet, but will
> so soon (as we had no related memory leaks as far as we know).Or
> However, I would really like to just wait until that thread stops.
> Is there any other way than reflection to wait for that thread to stop?
> manually stop it?There is no method to do that, the only option might be to sleep for 500
milliseconds or more (see
https://github.com/FirebirdSQL/jaybird/blob/Branch_2_2/src/pool/org/firebirdsql/pool/PooledConnectionQueue.java#L571
), although that is still no guarantee.
Unless you have a very good reason to stay with it, I'd suggest you move
to a third-party connection pool. This class (and everything else in
org.firebirdsql.pool) is going to be removed in Jaybird 3.0.
Mark