Hi all,

We've been unofficially tossing around the idea of creating a session interface used by the core DirectoryService.  The idea was to have a central location where session scope parameters for LDAP operations going into the core can be managed.  These are things like controls, the principal that authenticated, the authentication level and other related parameters.  I whipped together such an interface and documented these elements in the javadocs for anyone interested to review.  The interface is called CoreSession and can be found here:


First I would like to have some feedback on this before I start using the interace.  To decouple JNDI in the final step (phase III) of the bigbang we need also to expose interfaces for performing operations against the core DirectoryService.  These request operations will wrap up parameters in the OperationContexts already defined.  OperationContexts will contain a reference to the CoreSession.  

One idea floating around was to expose doXxxx() methods for different kinds of operations that can be performed on the core DirectoryService.  At some point we were thinking of exposing these methods on the DirectoryService.  Then we thought this might make the DirectoryService too cluttered.  So then we thought some other interface (i.e. OperationManager etc) can be defined and access to it may be provided via a getter on the DirectoryService.  This was one aspect of the discussions.

Another aspect revolved around whether or not these doXxxx() LDAP operation methods would take all parameters as arguments or just take these OperationContext objects.  If we expose doXxxx() methods which take the parameters and not their respective operations we're going to have to require an additional LdapSession argument to all methods except for bind (although some overloads of bind may take a session).

I'm starting to think it might be best to expose these doXxxx() methods on the CoreSession interface taking operation parameters arguments to hide these OperationContext objects from users.  Also this way we can avoid having an additional CoreSession parameter if we go this route instead of exposing these interfaces on the DirectoryService or some other interface.  I'll try to mock these up as well and put them into the CoreSession for review.