开发者

JUnit - Oracle Database and StaleConnections

I was wondering is there any way in Java to force a stale connection?

We have some logic that determines if a sqlexception received is actually a Stale Connection - if it is we try and reconnect to the database.

I could开发者_运维知识库 not find any objects that could be mocked (using EasyMock or Powermock) in order to similulate a stale connection so I was there any properties we can set on the connection cache to expire a connection?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜