You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Ralph Goers <Ra...@digitalinsight.com> on 2004/04/15 23:54:20 UTC

Question on usage


I currently have code that uses JNDI to access LDAP. I then have unit tests
for that code.  At the moment these go against a real LDAP. I would like to
use an in-memory JNDI implementation instead to do unit testing (it really
borders on functional testing since it writes stuff and then reads it).

Is the naming package appropriate for this?  From a quick glance I'm hoping
BaseDirContext will do the job, but I don't see a factory to set
java.naming.factory.initial to.

Any advice would be appreciated. 

Thanks
Ralph

RE: Question on usage

Posted by Alex Karasulu <ao...@bellsouth.net>.
Ralph,

I'm not the lead on the naming JNDI provider but don't think you can 
use your code with it because of namespace issues.  The naming code may 
have a provider but I think its suited to toward the java ENC namespace.  
If your code is written to work with an LDAP directory via the JNDI then 
it will not work with anything other than a JNDI LDAP provider.  

I would recommend using Eve's LDAP JNDI provider which basically embeds 
the Eve directory server's backend into your application but its still 
under development.  

Alex

> -----Original Message-----
> From: Ralph Goers [mailto:Ralph.Goers@digitalinsight.com]
> Sent: Thursday, April 15, 2004 5:54 PM
> To: 'Apache Directory Developers List'
> Subject: Question on usage
> 
> 
> 
> I currently have code that uses JNDI to access LDAP. I then have unit
> tests
> for that code.  At the moment these go against a real LDAP. I would like
> to
> use an in-memory JNDI implementation instead to do unit testing (it really
> borders on functional testing since it writes stuff and then reads it).
> 
> Is the naming package appropriate for this?  From a quick glance I'm
> hoping
> BaseDirContext will do the job, but I don't see a factory to set
> java.naming.factory.initial to.
> 
> Any advice would be appreciated.
> 
> Thanks
> Ralph