How to shutdown Derby in-memory database Properly

后端 未结 3 1427
一个人的身影
一个人的身影 2020-12-28 19:24

I\'m using derby as an embedded database. Furthermore, I\'m using it\'s in-memory database option for my unit tests.

What I can\'t figure out is how to properly shu

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-28 20:19

    XJ015 (with SQLCODE 50000) is the expected (successful) SQLSTATE for complete system shutdown. 08006 (with SQLCODE 45000), on the other hand, is the expected SQLSTATE for shutdown of only an individual database.

    DriverManager.getConnection("jdbc:derby:;shutdown=true");
    

    Shuts down the entire system and should result in XJ015.

提交回复
热议问题