除了专有的Sun之外,是否有任何好的CachedRowSet实现? [英] Are there any good CachedRowSet implementations other than the proprietary Sun one?

查看:234
本文介绍了除了专有的Sun之外,是否有任何好的CachedRowSet实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调查使用 <$我的部分应用程序中有c $ c> javax.sql.rowset.CachedRowSet ,但是我只能找到有关使用专有sun实现的信息 com.sun.rowset.CachedRowSetImpl 或Oracle特定的实现。

I am investigating using javax.sql.rowset.CachedRowSet in part of my application, however I can only find information on using the proprietary sun implementation com.sun.rowset.CachedRowSetImpl or Oracle specific implementations.

sun实现是不受支持且可能会发生变化。如果我希望将来部署到非Sun虚拟机,使用它也可能会导致问题,最后它会在我们的构建日志中留下不可抑制的警告,这可能会掩盖其他警告。

The sun implementation is unsupported and subject to change. Using this could also cause problems if I want to deploy to non-Sun virtual machines in the future, and finally it leaves unsuppressible warnings in our build logs which can mask other warnings.

我是否可以使用我的应用程序部署的开源替代实现,它可以在多个数据库中正常运行?至少支持MySQL的东西。

Is there an open source alternative implementation that we I can deploy with my application that will work well across multiple databases? At a minimum something that supports MySQL.

推荐答案

你不应该直接实例化CachedRowSet的实现 - 使用它的Provider来获取实例:请参阅 http://docs.oracle.com/javase/ 7 / docs / api / javax / sql / rowset / RowSetProvider.html (自JDK7起可用)

You shouldn't be directly instantiating implementation of CachedRowSet -- use its Provider to obtain an instance: see http://docs.oracle.com/javase/7/docs/api/javax/sql/rowset/RowSetProvider.html (available since JDK7)

实际上,CachedRowSet的接口和相关工厂都是标准/便携式。

In fact, CachedRowSet's interface and related factory are standard/portable.

像下面的内容一样:

CachedRowSet crs = RowSetProvider.newFactory().createCachedRowSet();
crs.populate(myResultSet);

这篇关于除了专有的Sun之外,是否有任何好的CachedRowSet实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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