Guest User

While monitoring via JENNIFER, I noticed an alert message like below. I am using the mybatis with DB Framework. I was wondering if this is related with mybatis setting. Thanks.


Khalid Saeed

To initiate the DB tasks at the myBatis (the name has changed from iBatis since the Google took the related project.), the returning logic (.close()calling) against the JDBC resources would not be written but call the method instead. In other words, it designates the myBatis to control the JDBC resources.

session.selectList(“com.test.mapper.TestSql”, parameterName)
session.insert(“com.test.mapper.TestSql”, parameterName)
session.update(“com.test.mapper.TestSql”, parameterName)
session.delete(“com.test.mapper.TestSql”, parameterName)
To be able to call for the returning logic, you can do so by overriding the myBatis JDBC related objects. Unless you called for the logic initiated with override, you could notice JDBC not returning alert (due to gap created between a point when JENNIFER recognized and managning cycle inside the myBatis) depending on the myBatis setting.

- when you notice the PreparedStatement not returning alert

You need to check that how the “defaultExecutorType” was set on the mybatis-config.xml. The default is set to “SIMPLE.” If it is set to “REUSE,” the PreparedStatement would be reused. As a result, the not returning alert would occur. You will not see it once you change the “REUSE” into “SIMPLE.” (It means the returning process would properly be done inside the myBatis.)

Guest User

thanks for your response. I changed the “defaultExecutorType" into SIMPLE at the mybatis-config.xml just like you said, however, I still notice an alert. Did I miss something else when using the SPRING Framework? Thanks for your support.