Re: Logging Abandoned Connection

Kean Erickson <[email protected]>
Newsgroups gmane.comp.java.openejb.user
Message-ID <CAPdwkmSR9UzijTZmtBwqES2pm3S3yds6KuxKr7x+NutzUC6H=Q__11094.6842630923$1695839655$gmane$org@mail.gmail.com>
I believe you need a couple more properties for abandoned connections to be
pruned:

removeAbandoned="true"
removeAbandonedTimeout="60"


On Wed, Sep 27, 2023, 12:18 AM chege <[email protected]> wrote:

> Hi,
>
> I using tomee 8.0.14. I want to see which code is not closing
> connections. I have set logAbandoned true in my datasource.
> However I don't see the any abandoned connection logged.
>
>
>  <Resource id="jdbc/abc" type="DataSource">
>
>       DataSourceCreator tomcat
>       JdbcDriver org.postgresql.Driver
>       JdbcUrl jdbc:postgresql://localhost:5432/abc
>        username ***
>       password ***
>       JtaManaged true
>       InitialSize 10
>       MaxActive 50
>       MaxIdle 25
>       MinIdle 10
>       TestOnBorrow true
>       TestWhileIdle true
>       ValidationQuery select 1
>       logAbandoned true
>     </Resource>
>
>
> What else do I need to do to see connection leaks logged?
>
>
> Chege.
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.