Here is what I would like to achieve:
On one hand, I have an Oracle
database. On the other hand, a "simple" Java application (let's call it "App").
And in the middle, an embedded ApacheDS
in Java
. The idea is to access that database through the embedded LDAP server.
At the moment, I'm able to connect "App" to the embedded LDAP Server, send parameters to it and execute some sql in the Oracle
database.
But the problem is that I can't get the result back to "App". Apparently, I should use my own "SearchHandler", but I can't figure out how to do it.
I hope my explanations are clear enough. If not, I can try to give more details.
server.setSearchHandler(new LdapRequestHandler<InternalSearchRequest>() {
@Override
public void handle(LdapSession ls, InternalSearchRequest t) throws Exception {
//Getting data from Oracle database
System.out.println(dataFromDatabase);
}
});