I have learned that JDBC PreparedStatement and PGBouncer can not work together because PreparedStatement uses session pooling and is pre-compiled and PGbouncer uses transactional level pooling.
My question is can createStatement be used with PGBouncer since it is not pre-compiled? and if not can someone point me to another Java api that can connect to the database and can use PGbouncer?