天道酬勤,学无止境

cachedrowset

除了专有的Sun以外,是否还有其他任何好的CachedRowSet实现?(Are there any good CachedRowSet implementations other than the proprietary Sun one?)

问题 我正在研究在部分应用程序中使用javax.sql.rowset.CachedRowSet,但是我只能找到有关使用专有sun实现com.sun.rowset.CachedRowSetImpl或Oracle特定实现的信息。 不支持sun实施,并且可能会更改。 如果将来我想将其部署到非Sun虚拟机上,使用此方法也可能导致问题,最后,它在我们的构建日志中留下了无法抑制的警告,可以掩盖其他警告。 我是否可以使用我的应用程序部署一个开源替代实现,该实现在多个数据库之间都能很好地工作? 至少支持MySQL的东西。 回答1 您不应该直接实例化CachedRowSet的实现-使用其Provider获取实例:请参见http://docs.oracle.com/javase/7/docs/api/javax/sql/rowset/RowSetProvider.html(可用) (自JDK7起) 实际上,CachedRowSet的接口和相关工厂是标准/便携式的。 像下面这样的东西就可以达到目的: CachedRowSet crs = RowSetProvider.newFactory().createCachedRowSet(); crs.populate(myResultSet); 回答2 这是我对CachedRowSetImpl的改进实现,以支持MySQL 5.x名称和标签。

2021-04-30 15:28:35    分类:技术分享    java   mysql   jdbc   cachedrowset

Are there any good CachedRowSet implementations other than the proprietary Sun one?

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. 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. Is there an open source alternative implementation that we I can deploy with my application that will work well

2021-04-15 13:35:49    分类:问答    java   mysql   jdbc   cachedrowset

Implementations of RowSet, CachedRowSet etc

Until today I was working with ResultSet when handling results from queries. But today I read a little about RowSet and CachedRowset and I realized they can serve my purposes better. While in all the examples I read where RowSet and CachedRowSet were referred to as object, when I tried it myself in my code I realized those are interfaces and in the examples they use some implementation of those interfaces. Now my question is where do I find those implementations, and is there something official? Do I need to download them or do they come with the JDK?

2021-04-09 09:27:37    分类:问答    java   jdbc   resultset   rowset   cachedrowset