After a few queries get executed I'm getting the following message from Hibernate:
HHH000106: Forcing container resource cleanup on transaction completion
Everything seems to be working fine, there are no errors, but I haven't found any explanation as to what this message means, or if I should do anything about it.
I'm using Hibernate/JPA with JTA global transactions.
Any ideas?
(To complete xwoker's answer.)
The resources we are talking about are:
This message occurs because you left some of those resources open i.e. you didn't call their close()
method. Due to the current ConnectionReleaseMode: those resources became useless and Hibernate informs you that it is calling the close() method for you.
To avoid this log: just call the close() method (on your ResultSet(s) and Statement(s)) yourself before the end of the transaction.
This message is produced in the org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl (at least is that the only place I found it used) and is declared as INFO:
public void afterTransaction() {
transactionTimeOutInstant = -1;
if ( connectionReleaseMode() == ConnectionReleaseMode.AFTER_STATEMENT ||
connectionReleaseMode() == ConnectionReleaseMode.AFTER_TRANSACTION ) {
if ( hasRegisteredResources() ) {
LOG.forcingContainerResourceCleanup();
releaseResources();
}
getLogicalConnection().aggressiveRelease();
}
}
If certain ConnectionReleaseModes are used and there are registered resources, Hibernate informs you, that it releases these resources.
If this is the desired behaviour, don't do anything about it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With