No, the code fragment I showed below is within the EJB. I have methods in my EJB which perform a directory lookup, populate a serializable value object and return that object to the client. (that part works fine)
-Jason
| Scott M Stark <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 06/22/2001 10:36 AM
|
To: [EMAIL PROTECTED] cc: Subject: Re: [JBoss-user] search LDAP via federated JNDI |
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 22, 2001 6:30 AM
Subject: [JBoss-user] search LDAP via federated JNDI
> I followed the directions in the documentation for federating LDAP into
> the JNDI context -- everything appears to have worked properly, as I can
> view the contents of the directory via the JNDIView MBean.
> (suggestion: can we limit how many entries show up there? Our
> directory has 50,000+ entries---this page either takes forever to load, or
> causes the MBean to throw an OutOfMemoryException)
>
Yes, I need to add a depth/count limit to the list method.
>
> Does anybody have any example of how I can get the DirContext so that I
> can search the LDAP directory? I've tried it like this:
>
> ldapCtx = (DirContext)ctx.lookup("external/ldap/EDS");
>
> (I later use ldapCtx.search(....) to retrieve entries from the directory)
> This works successfully when I bind manually to the LDAP server from
> within my cilent code (in a stateless session bean), but it would be nice
> to use federated JNDI so I don't have to manage the binding code from
> within the bean.
>
It looks like your trying to return the DirContext to the client from an EJB.
This won't work in this case because the Sun ldap provider does not provider
Serialiable implementations of DirContext.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
