⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 springjmxserver.java

📁 jmx在spring中的实现
💻 JAVA
字号:
/*
======================================================================

  SpringJmxServer.java

  Created by Claude Duguay
  Copyright (c) 2005

======================================================================
*/

package com.claudeduguay.jmx.demo.server;

import org.springframework.context.*;
import org.springframework.context.support.*;

import mx4j.tools.adaptor.http.*;

/*
 * To use the SpringJmxServer, use the following command line
 * arguments to activate the Java 1.5 JMX Server.
 * 
 * -Dcom.sun.management.jmxremote.port=8999
 * -Dcom.sun.management.jmxremote.ssl=false
 * -Dcom.sun.management.jmxremote.authenticate=false
 */

public class SpringJmxServer
{
	public static void main(String[] args)
		throws Exception
	{
		String SPRING_FILE = "com/claudeduguay/jmx/demo/server/SpringJmxServer.xml";
		ApplicationContext context = new ClassPathXmlApplicationContext(SPRING_FILE);
		HttpAdaptor httpAdaptor = (HttpAdaptor)context.getBean("HttpAdaptor");
		httpAdaptor.start();
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -