0 Replies Latest reply on Jan 5, 2004 11:34 AM by s_mehra

    looking up an External JNDI LDAP Context

    s_mehra

      Hi all,

      I set up an ExternalContext to a Ldap server by adding the following mbean in the jboss-service.xml (JBOSS version 3.2.3):

      <mbean code="org.jboss.naming.ExternalContext" name="jboss.jndi:service=ExternalContext,jndiName=ext/servers">
       <attribute name="JndiName">ext/servers</attribute>
       <attribute name="RemoteAccess">true</attribute>
       <attribute name="InitialContext">javax.naming.ldap.InitialLdapContext</attribute>
       <attribute name="PropertiesURL">myldap.properties</attribute>
       <depends>jboss:service=Naming</depends>
       </mbean>

      The contents of myldap.properties is:

      java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
      java.naming.provider.url=ldap://myhost:389/dc=novice,dc=com
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces


      JNDIView works fine, but when I used a standalone java program to perform a lookup on the External Context(ext/servers) I get back a Reference. How can I use this Reference to get an InitialDirContext?

      Thanks!

      SM