Title: Binding external LDAP into jboss 3.0 JNDI name space

Hi,
I have been struggling with this problem for last two days. If anybody there can give me some hints, it will be greatly appreciated!

The Jboss 3.0 is installed on Windows 2000.

I am following the Jboss document for federating external LDAP into Jboss JNDI context using ExternalContext MBean. I created a ldap-service.xml and deploy it under server\default\deploy. It seems it is deployed successfully.  From JNDIView MBean, I can see the service=ExternalContext is registed under right jndiName in the DefaultDomain. But I can't see the external LDAP contents. Is something wrong already here?

I wrote a very simple bean and deployed into the jboss. The part of the code looks as following:
        DirContext iniCtx = new InitialDirContext();
            DirContext ldapCtx = (DirContext)iniCtx.lookup("external/ldap/iplanet");
        Attributes attrs = ldapCtx.getAttributes("uid=3Gold, ou=People");

When it executes getAttributes(), it throws "java.rmi.ServerException: Naming lookup failure: Not an instance of DirContext".

The attached is the ldap-service.xml for deploying external LDAP through ExternalContext MBean. One thing I am not sure in this file is the Properties attribute. I tried all values I can think of, such as <file:///SAAS_Home/config/saas_ldap.properties>, C:/SAAS_Home/config/saas_ldap.properties, c:\\SAAS_Home\\config\\saas_ldap.properties, <file:/C:/SAAS_Home/config/saas_ldap.properties>

I searched the jboss-user mailing by key words such as "DirContext", "LDAP", "naming lookup" and "ExternalContext" and etc. I could not find too much help. Any help will be greatly appreciated!

-Minsheng
<<ldap-service.xml>>

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE server> 
<server> 
	<classpath codebase="lib" archives="jboss.jar"/> 
	<!-- ========================================================== -->
	<!-- LDAP Service --> 
	<!-- ========================================================== --> 
	<mbean code="org.jboss.naming.ExternalContext" 
		    name="DefaultDomain:service=ExternalContext,jndiName=external/ldap/iplanet" > 
		<attribute name="JndiName">external/ldap/iplanet</attribute> 
		<attribute name="Properties">file:/C:/SAAS_home/config/saas_ldap.properties</attribute> 
		<attribute name="InitialContext">javax.naming.ldap.InitialLdapContext</attribute>
		<attribute name="RemoteAccess">true</attribute> 
	</mbean> 
</server> 


Reply via email to