开发者

Derby server connection already exist

In my application I need to check whether the Derby server is already running, and if not start the server. Can开发者_StackOverflow社区 anybody tell me how to check that?


The simplest way I can think of is to retrieve a Derby Connection. If there's an exception thrown by retrieving the connection, chances are the connection doesn't exist and you can start one.


There is also a 'ping' command available through the NetworkServerControl class: http://db.apache.org/derby/docs/10.8/publishedapi/jdbc4/org/apache/derby/drda/NetworkServerControl.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜