Results 1 to 4 of 4

Thread: Exposing spring JMX MBeans in Weblogic 9.2

Threaded View

  1. #1
    Join Date
    Jan 2008
    Posts
    9

    Default Exposing spring JMX MBeans in Weblogic 9.2

    I'm using spring 2.0.8 with weblogic 9.2 and java 1.5 and I have a class with attributes I wish to expose annotated with the 1.5 JMX annotations, implementing an interface containing the methods I wish to expose. Here's the relevent section of my application context config:


    Code:
    	<!-- JMX Config -->
        <bean id="namingStrategy"
              class="org.springframework.jmx.export.naming.MetadataNamingStrategy">
            <property name="attributeSource" ref="jmxAttributeSource"/>
        </bean>
        
        <bean id="jmxAttributeSource"
              class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource"/>  
      
        <bean id="assembler"
              class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
            <property name="attributeSource" ref="jmxAttributeSource"/>
        </bean>
        
       <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
          <property name="beans">
          <map>
            <entry key="bean:name=paymentProcessor" value-ref="paymentProcessor"/>
          </map>
        </property> 
        <property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING"/>
        <property name="assembler" ref="assembler"/>
        <property name="namingStrategy" ref="namingStrategy"/>   
        <property name="autodetect" value="true"/>
        <property name="server" ref="runtimeMbeanServerConnection"/>
       </bean>    
    
    <bean id="server" class="org.springframework.jndi.JndiObjectFactoryBean">
    	  	<property name="jndiName" value="java:comp/env/jmx/runtime" />
    	</bean>
    </bean>
    When I deploy my application as an .ear file to weblogic, I can't find the paymentProcessor mbean that I've defined - by using the weblogic wlconfig ant task as follow:
    Code:
    <wlconfig url="t3://hostname:port" username="system" password="weblogic" >
            <get mbean="bean:name=PaymentProcessor"  attribute="myAttribute" property="att" /> 	
          </wlconfig>
          <echo  message="PauseInterval : ${att}" />
    This returns me the message: Could not find provider: bean:name=PaymentProcessor

    Does any of this look wrong? Is there anything else I should be configuring to get this working? Many thanks!
    Last edited by mirageman; Jan 24th, 2008 at 10:51 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •