[jboss-user] [JNDI/Naming/Network] - JNDIBindingServiceMgr & JNDI local (java:comp/env) namespace

TurangaLeela do-not-reply at jboss.com
Fri Aug 22 07:45:42 EDT 2008


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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172000#4172000

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172000



More information about the jboss-user mailing list