Results 1 to 4 of 4

Thread: Exposing spring JMX MBeans in Weblogic 9.2

  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.

  2. #2
    Join Date
    Jan 2008
    Posts
    9

    Unhappy

    Can no one help me with this problem? I'm still stuck!

  3. #3
    Join Date
    Jun 2005
    Location
    México City
    Posts
    47

    Default Typo?

    Hello.

    Maybe this reply is not useful anymore, but here goes: I do not know if this is a typo or if it is intentional just for the purpose of illustration, but you are injecting the server with another name. The name of your MBeanServer bean is not the one you are injecting, but 'server'.

    I wish I could help more, but I am not accessing the mbeans the way you are.


    Rgds.

    J.
    This is a block of text that can be added to posts you make. There is a 255 character limit.

  4. #4
    Join Date
    Mar 2008
    Location
    Orlando
    Posts
    4

    Default

    Say, you're probably beyond this now, but I see in your Spring configuration the MBean is identified as "bean:name=paymentProcessor", but in your weblogic config it is "bean:name=PaymentProcessor". Was that intentional?

Posting Permissions

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