开发者

JUnit - Oracle Database and StaleConnections

开发者 https://www.devze.com 2023-03-18 16:47 出处:网络
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 t

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

精彩评论

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