In Payara 5 I am getting a "Statement Wrapping should be set to true before performing this operation" when trying to run
"./asadmin set resources.jdbc-connection-pool.mysql_MY-DB-NAME_rootPool.max-wait-time-in-millis=604800"
In a nutshell:
./asadmin set resources.jdbc-connection-pool.mysql_MY-DB-NAME_rootPool.max-wait-time-in-millis=604800
Enter admin user name> MY_ADMIN_USER
Enter admin password for user "MY_ADMIN_USER">
remote failure: Could not change the attributes: Constraints for this JdbcConnectionPool configuration have been violated: on property [ ] violation reason [ Statement Wrapping should be set to true before performing this operation ]
Constraints for this JdbcConnectionPool configuration have been violated: on property [ ] violation reason [ Statement Wrapping should be set to true before performing this operation ]
Command set failed
Does anybody know what this error message means?
It means you have to enable the "wrap-jdbc-objects" option on the connection pool before it will allow you to set this other property. In domain.xml do this
<jdbc-connection-pool
name="my-conn-pool"
wrap-jdbc-objects="true" ...>
There is also an equivalent asadmin command.
It looks like the constraint is only enforced in Payara 5, in earlier versions it did not produce this error.