Announcement Announcement Module
Collapse
No announcement yet.
Spring JMX and Weblogic MC4J Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring JMX and Weblogic MC4J

    I do not have any deployment issues with the below configuration but I could not see this managed bean in MC4J console. What am I missing or completely lost? Just trying to expose a bean's method for test purposes... so that we can extend this later for more complex uses...Any pointers and suggestions would be appreciated.
    Using Spring 2.x, Weblogic9.2, jdk1.5 and Windows XP

    Code:
    <!-- create a test bean -->
    <bean id="testHelper" class="com.test.TestHelper"/> 
    
    <!-- create mbean server -->
    <bean id="mbeanServer" class="org.springframework.jndi.JndiObjectFactoryBean">
    	<property name="jndiName" value="java:comp/env/jmx/runtime"/>
    </bean> 	
    
    <!-- Export beans to mbean server -->
    <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
    	<property name="server" ref="mbeanServer"/>
    	<property name="autodetect" value="true"/>
    	<property name="beans">
    		<map>
    			<entry key="bean:name=executeMethod1" value-ref="testHelper"/>
    		</map>
    	</property>
    	<!-- build method assembler -->
    	<property name="assembler">
    		<bean class="org.springframework.jmx.export.assembler.MethodNameBasedMBeanInfoAssembler">
    			<property name="managedMethods">
    				<value>executeMethod1</value>  					
    			</property>
    		</bean>
    	</property>
    </bean>
    
    <!-- Open server connection -->    
    <bean id="runtimeMbeanServerConnection" class="org.springframework.jmx.support.MBeanServerConnectionFactoryBean" >
    	<property name="serviceUrl" value="service:jmx:t3://localhost:7003/jndi/weblogic.management.mbeanservers.runtime"/>
    	<property name="environment">
    	<props>
    		<prop key="java.naming.security.principal">weblogic</prop>
    		<prop key="java.naming.security.credentials">weblogic</prop>
    		<prop key="jmx.remote.protocol.provider.pkgs">weblogic.management.remote</prop>
    	</props>
    	</property>
    </bean>
    Last edited by seekSF123; Apr 7th, 2010, 02:06 PM. Reason: re arrange subject line
Working...
X