On Wed, Jul 31, 2013 at 4:47 PM, Dave Roberts <[email protected]> wrote: > It's possible to deploy FTP Server post 1.0.8 in an OSGi container. > However creating a different User Manager implementation is not > without problems. > > Consider that the USER class checks to see if the user logging in is > permitted to do so concurrently. This is done by creating an > instance of > org.apache.ftpserver.usermanager.impl.ConcurrentLoginRequest and > passing that to the authorize(AuthorizationRequest) method for the > User object. > > If that User implementation is not one that's included with FTP > Server, then the new implementation has no way of handling the > request in a reasonable manner because the package > org.apache.ftpserver.usermanager.impl is not exported in the OSGi > container. > > Is it intended that such functionality is "private", or should there > be suitable interfaces created for the *Request classes, and > potentially move the Authority implementations also, so that they > may be re-used? In which case it'd be nice to expose the BaseUser > class as well. > > I'm happy to make some changes and submit patches, but don't want to > go off in a different direction than that intended by the team.
I'll say right out that the OSGi stuff isn't perfect in any way. Anyhow, the idea is that the UserManager/User shouldn't need to care about Authority/AuthorizationRequest implementations. That said, setting up a user with the correct authorities in the user manager, like in PropertiesUserManager.getUserByName() won't work with OSGi. Patches would be most welcome! /niklas
