You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Eugene Prokopiev <en...@itx.ru> on 2012/11/23 11:00:45 UTC
DirectoryService.getSession thread safe
Hi,
Is it possible to use DirectoryService.getSession (or getAdminSession) from
different threads inside tha same JVM with embedded ApacheDS or I need to
use network connection?
--
Regards,
Eugene Prokopiev
Re: DirectoryService.getSession thread safe
Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 11/23/12 11:00 AM, Eugene Prokopiev a écrit :
> Hi,
>
> Is it possible to use DirectoryService.getSession (or getAdminSession) from
> different threads inside tha same JVM with embedded ApacheDS or I need to
> use network connection?
It's thread safe. Every operation started with getSession() will go
though the OperationManager() which guarantee a protected access to the
backend :
// Call the Add method
Interceptor head = directoryService.getInterceptor(
addContext.getNextInterceptor() );
try
{
lockWrite();
head.add( addContext );
}
finally
{
unlockWrite();
}
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com