ITPub博客

首页 > 数据库 > 数据库开发技术 > DB2连接的问题

DB2连接的问题

原创 数据库开发技术 作者:paodekuai 时间:2007-04-04 10:28:12 0 删除 编辑
Problem
I create a connected datastore object in a servlet and then pass the connected datastore object to a method in a different servelet to perform an operation. I frequently get DKException "[IBM][CLI Driver] CLI0125E Function sequence error. SQLSTATE=HY010 "
Cause
If the same datastore object is not property synchronized in a multithreading scenario, the following error is likely to occur when performing operations on the datastore:


DKException
[IBM][CLI Driver] CLI0125E Function sequence error. SQLSTATE=HY010

Solution
This is a classic symptom of a threading problem. Most likely, the same datastore instance is used by multiple threads at the same time.


Either strictly synchronize your access to the datastore object or have each thread use its own separate connected DKDatastoreICM object.

Using separate datastore objects is the safest solution.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/98828/viewspace-908648/,如需转载,请注明出处,否则将追究法律责任。

上一篇: db2
下一篇: 讨论
请登录后发表评论 登录
全部评论

注册时间:2011-05-23

  • 博文量
    74
  • 访问量
    2644485