Many application servers have connection pools integrated, and even standalone applications can be configured for use one like HikariCP, Apache DBCP, etc.
So what is the advantage of using PgBouncer when the application already have a connection pool?
The most close answer I found is What are advantages of using transaction pooling with pgbouncer? which do no mention the use of another connection pool and mentions that the advantage is the idle sessions usage.
I primary use WildFly configured with min pool size, max pool size, idle timeout... so it essentially removes idle connections when they are not in use (if that it's the main advantage).
This makes me think that PgBouncer don't fit in this scenario and I just should keep using my application server connection pool only.
BTW, in transaction pooling mode, PgBouncer can't use named prepared statements which don't look like a performance wise choice.
If there is any advantage, do it plays well with the wildfly connection pool?