JDBC 4的java.sql.Clob.free()方法和向后兼容 [英] JDBC 4's java.sql.Clob.free() method and backwards compatibility

查看:261
本文介绍了JDBC 4的java.sql.Clob.free()方法和向后兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调查一个有趣的性能问题,其中没有调用

I'm investigating an interesting performance issue, where there are no calls to java.sql.Clob.free() on a frequently used resource. This method on Clob was introduced in Java 6 / JDBC 4, so it might well be that this is actually a regression introduced when upgrading from JDBC 3 to JDBC 4.

这是Oracle JDBC驱动程序中的已知问题吗?可以说,以前Clobs以某种方式神奇地释放了自己,而使用JDBC 4时,它们必须是手动释放的?还是有可用于与JDBC 3保持兼容的驱动程序设置?

Is this a known issue in the Oracle JDBC driver? Can it be said that before, Clobs somehow magically freed themselves, whereas with JDBC 4, they MUST be freed manually? Or is there a driver setting that can be used to stay compatible with JDBC 3?

请注意,Blob同样适用.

推荐答案

我们的应用程序必须确保在oracle.sql.CLOB上显式调用java.sql.Clob.free()(用于Jdbc()来获取Java. sql.Clob)与Oracle 11g和'ojdbc6.jar'(MANIFEST.MF中的规范版本'4.0'和实现版本'11 .2.0.3.0').否则,应用程序将遭受大量内存泄漏.

Our application had to be sure to call java.sql.Clob.free() explicitly on oracle.sql.CLOB (used toJdbc() to get java.sql.Clob) with Oracle 11g and 'ojdbc6.jar' (Specification-Version '4.0' and Implementation-Version '11.2.0.3.0' in MANIFEST.MF). Otherwise the application suffered from substantial memory leaks.

这篇关于JDBC 4的java.sql.Clob.free()方法和向后兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆