2 Replies Latest reply on Nov 3, 2006 8:04 PM by J Yang

    binding MBean to JNDI name

    J Yang Newbie

      Hi

      How can I bind MBean to a JNDI name? The JNDIMap example shows binding via code, but is there a way to do this in the configuration file?

      Thank you,
      Jennifer

        • 2. Re: binding MBean to JNDI name
          J Yang Newbie

          Rob,

          As a test, I copied and pasted following in TreeCache MBean config from the Wiki link you sent me.

          <mbean code="org.jboss.cache.TreeCache"
           name="test:service=MyCache">
          ...
           <attribute name="BindingsConfig" serialDataType="jbxb">
           <jndi:bindings
           xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:jndi="urn:jboss:jndi-binding-service:1.0"
           xs:schemaLocation="urn:jboss:jndi-binding-service:1.0 resource:jndi-binding-service_1_0.xsd"
           >
           <jndi:binding name="urls/jboss-home">
           <jndi:value type="java.net.URL">http://www.jboss.org</jndi:value>
           </jndi:binding>
           </jndi:bindings>
           </attribute>
          


          When I went to JMX console for the list of JNDI names, I didn't see "urls/jboss-home". Is this correct way of defining JNDI name?

          Also, if I want to link my TreeCache to the JNDI name, what should I specify for jndi:value?

          Thanks,
          Jennifer