Re: Configuring a custom UserManager
Sorry for the late reply. On Wed, Nov 17, 2010 at 6:19 PM, John Hartnup john.hart...@gmail.com wrote: SITE.java in 1.0.5 has a static COMMAND_MAP variable, intialised with the site command objects in a static block. Command command = (Command) COMMAND_MAP.get(siteRequest); The trunk instead uses : Command command = context.getCommandFactory().getCommand(siteRequest); I much prefer the latter, as it allows me to create new SITE commands and register them at configuration time. Right, I was misunderstanding your question. I don't think there would be any problem to port the change in 1.1.x to 1.0.6 if that would help. /niklas
Re: Configuring a custom UserManager
On 14 November 2010 20:56, Niklas Gustavsson nik...@protocol7.com wrote: On Thu, Nov 11, 2010 at 6:15 PM, John Hartnup john.hart...@gmail.com wrote: OK, I've explained the issue. I was looking at the 1.1.0 SNAPSHOT source, while running the stable 1.0.5 code. 1.0.5 does not use the dynamically configured CommandFactory for SITE commands. Could you please explain the difference in behavior you're seeing between 1.0.5 and 1.1.0? I'm not aware of anything that has changed in this area. SITE.java in 1.0.5 has a static COMMAND_MAP variable, intialised with the site command objects in a static block. Command command = (Command) COMMAND_MAP.get(siteRequest); The trunk instead uses : Command command = context.getCommandFactory().getCommand(siteRequest); I much prefer the latter, as it allows me to create new SITE commands and register them at configuration time. For now, since I have to deploy 1.0.5, I am copying SITE.java and adding my own classes to COMMAND_MAP. -- There is no way to peace; peace is the way
Re: Configuring a custom UserManager
On Thu, Nov 11, 2010 at 6:15 PM, John Hartnup john.hart...@gmail.com wrote: OK, I've explained the issue. I was looking at the 1.1.0 SNAPSHOT source, while running the stable 1.0.5 code. 1.0.5 does not use the dynamically configured CommandFactory for SITE commands. Could you please explain the difference in behavior you're seeing between 1.0.5 and 1.1.0? I'm not aware of anything that has changed in this area. Is there some sort of guesstimate as to when 1.1.0 will become a stable release? I won't dare to make a predication :-) /niklas
Re: Configuring a custom UserManager
2010/11/11 John Hartnup john.hart...@gmail.com: OK, I've explained the issue. I was looking at the 1.1.0 SNAPSHOT source, while running the stable 1.0.5 code. 1.0.5 does not use the dynamically configured CommandFactory for SITE commands. Is there some sort of guesstimate as to when 1.1.0 will become a stable release? Maybe Niklas can give you an estimate, but there have been few changes for 1.1.x ... On 11 November 2010 14:27, John Hartnup john.hart...@gmail.com wrote: Hi again, On a similar note, I'm having trouble getting a custom SITE command in Apache ftpserver to work. commands command name=SITE_PARM spring:bean class=org.john.ftps.command.SITE_PARM/ /command /commands I can see (via logging) that the SITE_PARM object is constructed, but when I send the site parm ftp command, I get a 502 error, suggesting that the CommandFactory has not returned the object. Any suggestions? (By the way, is this the right mailing list to ask such questions?) I think the users mailing list was a more appropriate choice in your case. Note that FTPServer 'dev' list is the same as MINA developers list so I recommend that you use the prefix [FTPSERVER] or similar when you want to ask anything specific to FTPServer. Thanks, John -- There is no way to peace; peace is the way -- There is no way to peace; peace is the way
Re: Configuring a custom UserManager
On 12 November 2010 08:58, David Latorre dvl...@gmail.com wrote: 2010/11/11 John Hartnup john.hart...@gmail.com: OK, I've explained the issue. I was looking at the 1.1.0 SNAPSHOT source, while running the stable 1.0.5 code. 1.0.5 does not use the dynamically configured CommandFactory for SITE commands. Is there some sort of guesstimate as to when 1.1.0 will become a stable release? Maybe Niklas can give you an estimate, but there have been few changes for 1.1.x ... Yes, I've noticed a lot of the changes, and I like them! I think the users mailing list was a more appropriate choice in your case. Note that FTPServer 'dev' list is the same as MINA developers list so I recommend that you use the prefix [FTPSERVER] or similar when you want to ask anything specific to FTPServer. Noted: thanks. -- There is no way to peace; peace is the way
Re: Configuring a custom UserManager
Hi again, On a similar note, I'm having trouble getting a custom SITE command in Apache ftpserver to work. commands command name=SITE_PARM spring:bean class=org.john.ftps.command.SITE_PARM/ /command /commands I can see (via logging) that the SITE_PARM object is constructed, but when I send the site parm ftp command, I get a 502 error, suggesting that the CommandFactory has not returned the object. Any suggestions? (By the way, is this the right mailing list to ask such questions?) Thanks, John -- There is no way to peace; peace is the way
Re: Configuring a custom UserManager
OK, I've explained the issue. I was looking at the 1.1.0 SNAPSHOT source, while running the stable 1.0.5 code. 1.0.5 does not use the dynamically configured CommandFactory for SITE commands. Is there some sort of guesstimate as to when 1.1.0 will become a stable release? On 11 November 2010 14:27, John Hartnup john.hart...@gmail.com wrote: Hi again, On a similar note, I'm having trouble getting a custom SITE command in Apache ftpserver to work. commands command name=SITE_PARM spring:bean class=org.john.ftps.command.SITE_PARM/ /command /commands I can see (via logging) that the SITE_PARM object is constructed, but when I send the site parm ftp command, I get a 502 error, suggesting that the CommandFactory has not returned the object. Any suggestions? (By the way, is this the right mailing list to ask such questions?) Thanks, John -- There is no way to peace; peace is the way -- There is no way to peace; peace is the way
Re: Configuring a custom UserManager
Solved thus: server xmlns=http://mina.apache.org/ftpserver/spring/v1; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:spring=http://www.springframework.org/schema/beans; xsi:schemaLocation=http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd; id=server max-logins=500 anon-enabled=false listeners nio-listener name=default port=2021 data-connection idle-timeout=60 / /nio-listener /listeners user-manager spring:ref local=userManager / /user-manager Thanks, John On 9 November 2010 12:32, John Hartnup john.hart...@gmail.com wrote: Hi, I've written my own implementation of org.apache.ftpserver.ftplet.UserManager and I'm having trouble configuring my server to use it. The documentation says only: In your configuration file, you will have to use the Spring bean element to configure your custom user manager. The ftpserver XSD includes: !-- Extension element used for defining a custom user manager -- xs:element name=user-manager type=spring-bean-or-ref / So (and please excuse my XML naivete) I tried: bean id=userManager class=org.myorg.MyUserManager /bean server xmlns=http://mina.apache.org/ftpserver/spring/v1; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd; id=server max-logins=500 anon-enabled=false user-manager ref=userManager / /server This gives me the error: Attribute 'ref' is not allowed to appear in element 'user-manager' What should I have done? Any nudges about how to interpret the XSD are also welcome. Thanks, John -- There is no way to peace; peace is the way -- There is no way to peace; peace is the way