开发者

Spring 3 Web MVC with JMX client and remote service not running

The problem is relatively simple:

I have a web based application, that, among other things, needs to check for status of a remote service. This remote service has JMX based mbeans exposed. However, the remote service might be not running all the time. What I need is:

  1. Setup Spring to connect to remote JMX server
  2. When the remote is not running, present this information in the web ui

The problem with this is that if I setup the JMX cli开发者_JAVA技巧ent bean in springContext.xml and the service is not running, the webapp won't even start with exceptions like ConnectionRefused and so on.

So the question is: is there a way I can tell spring to ignore the fact that it cannot connect to remote mbean server and try it later?


I am assuming you are using the MBeanServerConnectionFactoryBean? Set the connectOnStartup property to false.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜