[jboss-user] [JBoss Portal] - Re: Portal LDAP integration problems

juhani_g do-not-reply at jboss.com
Sat Apr 5 11:26:32 EDT 2008


Update 2:

I think I found at least one part of the code that is causing problems:

It is findUserByUserName(String userName) in LDAPExtUserModuleImpl (that uses searchUsers).

I changed the code:

         SearchResult res = (SearchResult)sr.iterator().next();         
  |          Context ctx = (Context)res.getObject();
  |          String dn = ctx.getNameInNamespace();
  |          
  |          return createUserInstance(res.getAttributes(), dn);

With:

         SearchResult res = (SearchResult)sr.iterator().next();         
  |          Context ctx = (Context)res.getObject();
  |          String dn = ctx.getNameInNamespace();
  |          User user = createUserInstance(res.getAttributes(), dn);
  |          System.err.println("CREATED USER AND CLOSE CONTEXT");
  |          ctx.close();
  |          return user;

Now the Context is closed and caused the connection to be released right away (according to the pooling debug messages).

Continuing with experiments.

In any case, I do think the LDAP code needs optimizing. Is there any technical documentation on it available?

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

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



More information about the jboss-user mailing list