1

在 Payara 5 中,我在尝试运行时收到“在执行此操作之前应将语句包装设置为 true”

"./asadmin set resources.jdbc-connection-pool.mysql_MY-DB-NAME_rootPool.max-wait-time-in-millis=604800"

简而言之:

./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

有人知道这个错误信息是什么意思吗?

4

2 回答 2

3

这意味着您必须在连接池上启用“wrap-jdbc-objects”选项,然后才能设置此其他属性。在 domain.xml 中执行此操作

  <jdbc-connection-pool
        name="my-conn-pool"
        wrap-jdbc-objects="true" ...>

还有一个等效的 asadmin 命令。

看起来该约束仅在 Payara 5 中强制执行,在早期版本中它没有产生此错误。

于 2018-06-04T14:59:53.470 回答
0

这似乎也在 Payara 4.1.2.181 中强制执行,因为在 4.1.2.172 中不需要它

于 2018-11-07T18:16:10.243 回答