Hi there,
I have managed to get openldap setup with jboss connecting to it (by the method of editing jboss-service.xml and a properties file).
Properties file:
java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory java.naming.provider.url=ldap://localhost:389/dc=testing,dc=com java.naming.security.principal=cn=Manager,dc=testing,dc=com java.naming.security.authentication=simple java.naming.security.credentials=secret
<mbean code="org.jboss.naming.ExternalContext" name=":service=ExternalContext,jndiName=/ldap/configuration" > <attribute name="JndiName">/ldap/configuration</attribute> <attribute name="PropertiesURL">configuration.ldap</attribute> <attribute name="InitialContext">javax.naming.directory.InitialDirContext</attribute> <attribute name="RemoteAccess">true</attribute> </mbean>
InitialDirContext iniCtx = new InitialDirContext(); Object ldap = iniCtx.lookup("/ldap/configuration");