如何使用getJobDataMap()传递File和ResultSet [英] how can pass a File and ResultSet using getJobDataMap()
本文介绍了如何使用getJobDataMap()传递File和ResultSet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法使用石英调度程序使用getJobDataMap()将java.sql.ResultSet和java.io.File传递给Job类?
Is there any way to pass a java.sql.ResultSet and java.io.File to a Job class using getJobDataMap() using quartz scheduler?
推荐答案
您好,
getJobDataMap()返回对JobDataMap的引用,它基本上代表Key,value集合。唯一需要的是放在此映射中的所有值都必须是Serializable。所以我担心你可以把java.sql.ResultSet放在CachedRowSet之外。 java.io.File实例应该没问题。
问候,
Hello,
getJobDataMap() returns a reference to JobDataMap which basically represents a Key, value collection. The only required thing is that all values put in this map must be Serializable. So I am afraid you will be able to do put java.sql.ResultSet other than CachedRowSet. java.io.File instance should be fine.
Regards,
我通过传递文件路径来解决它而不是文件和查询字符串而不是ResultSet。
I solved it by passing file path instead File and query string instead ResultSet.
这篇关于如何使用getJobDataMap()传递File和ResultSet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文