开发者

Proper way of "shutdown" a spring context in J2SE

I'm currently e开发者_StackOverflow中文版xperiencing problems with a JPATransactionManager in a J2SE application.

The latest request was not properly saved in the database (surely a problem of cache).

This seems to be normal because the exit of the program does not seem to "cleanly" exit all Bean of the spring application context.

Do you know if there's a method of a clean shutdown a Spring context before exiting ?

Thank you in advance.


Checkout Spring Reference manual on this topic.

Basically you need to call registerShutdownHook() on the application context.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜