Friday, June 22, 2007

Working with LDAP & AD

PART 1 : (Getting a connection between AD,IplanetLDAP & openLDAP)

Now this time i am planning to share my knowledge about getting a connection between LDAP/AD to your JAVA based Web Application.

Let me tell the requirements first.. You need to have ldapjdk.jar you can download from the following location .

Code snippet for getting connection

netscape.ldap.LDAPConnection ldapconnection = new netscape.ldap.LDAPConnection();

By using the above three lines you can get the connection from LDAP/AD.Where the adminDN will change from LDAP& AD. {Where DN represents Distinguished Name}

Let us see sample adminDN for the above all..

adminDN format for AD ==>"cn=administrator,cn=users,dc=balamurugans,dc=com"

adminDN format for IPlanetLDAP ==>"uid=admin,ou=administrators,ou=topologymanagement,o=netscaperoot"

adminDN format for openLDAP ==>"cn=Bala,dc=balamurugans,dc=com"

Note default port number is "389" for all LDAP.

let us see how to fetch the data from the above LDAP's in my next post.

Using Spring and Hibernate with WebSphere Application Server

Now a days spring & hibernate has became more popular & it saves lots of development time for web application devlopment.Due to that, there is an increase in target users for Spring Framework .Where this article explains how to configure these frameworks for various scenarios with WebSphere Application Server.Note this is updated for Spring Framework 2.1

Click here for more details .