0 Replies Latest reply on Aug 22, 2008 7:45 AM by Leela Turanga

    JNDIBindingServiceMgr & JNDI local (java:comp/env) namespace

    Leela Turanga Newbie

      Hello,

      I'm configuring my arbitrary object for binding into JNDI as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 4.0//EN"
       "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd">
      <server>
       <mbean code="org.jboss.naming.JNDIBindingServiceMgr"
       name="jboss.tests:service=JNDIBindingServiceMgr">
       <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="my/jndiObject">
       <jndi:value type="package.packgae.MyType">
       My Value
       </jndi:value>
       </jndi:binding>
      
       </jndi:bindings>
       </attribute>
       <depends>jboss:service=Naming</depends>
       </mbean>
      </server>
      


      I have used JNDIBindingServiceMgr documentation (http://wiki.jboss.org/wiki/JNDIBindingServiceMgr) as sample.

      With this configuration I can access my object by java:my/jndiObject reference, i.e. it is bound to global namespace.

      What do I need to add/change if I want to lookup my object by java:comp/env/my/jndiObject reference?