/* * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.jmx.support; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import javax.management.MBeanServer; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.jmx.MBeanServerNotFoundException; import org.springframework.lang.Nullable; /** * {@link FactoryBean} that obtains a WebSphere {@link javax.management.MBeanServer} * reference through WebSphere's proprietary {@code AdminServiceFactory} API, * available on WebSphere 5.1 and higher. * *
Exposes the {@code MBeanServer} for bean references. * This FactoryBean is a direct alternative to {@link MBeanServerFactoryBean}, * which uses standard JMX 1.2 API to access the platform's MBeanServer. * *
See the javadocs for WebSphere's
* {@code AdminServiceFactory}
* and {@code MBeanFactory}.
*
* @author Juergen Hoeller
* @author Rob Harrop
* @since 2.0.3
* @see javax.management.MBeanServer
* @see MBeanServerFactoryBean
*/
public class WebSphereMBeanServerFactoryBean implements FactoryBean