Hi Alex,
Alex Karasulu wrote:
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:
http://quaipe.notlong.com/
I think that this API seems correct to me, but I would rather name it
LdapSession, because all the operations are really LDAP ones.
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.
To use an analogy, the OperationContext will be like a ServletRequest,
containing a lot of side informations.
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.
I think it's a better approach. We don't have thousands of arguments,
and it's always a burden for users to create another object to contain
some informations.
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.
Thoughts?
I see some possible extensions for 'internal operations'. From the user
point of view, LDAP requests are just enough. But we are using some more
specific requests inside the server, like List, Lookup, getRootDSE, and
such. It would be interesting to create some CoreSession and some
LdapSession interfaces, the first one used by the server and the second
one by the users. Maybe LdapSession will just inherit from CoreSession.
Anyway, this cover pretty much phase III (JNDI removal from the core
server).
Thanks !
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org