As part of the work I have been doing with Sakai and Bodington I needed to allow Sakai to access the user details that are stored in Bodington. The normal way to do this would be to write a UserDirectoryProvider (UDP) that sits in the components folder. The problem is that I didn't want to put the whole of Bodington into the components classloader and tomcat was going to load Bodington anyway as a webapp. The solution was to create a proxy that could be injected with the real Bodington UDP when Bodington started up. This needed to be an API that extended the standard UDP:
public interface ProxyUserDirectoryProvider extends UserDirectoryProvider {
UserDirectoryProvider getUdp();
void setUdp(UserDirectoryProvider udp);
}
This ProxyUserDirectoryProvider could then be requested from the component manager at Bodington startup and setUdp() called with the full implementation of the Bodington UDP. The proxy I created is currently sitting in https://svn.oucs.ox.ac.uk/projects/vle/sakai/user-proxy/trunk/.
No comments:
Post a Comment