Sorry for the late reply.
On Fri, Dec 3, 2010 at 2:59 AM, Manish Marathe <[email protected]> wrote:
> How can I add custom beans that I can reference from user-manager or any
> other element?
If you need to do this, you can not use <server> as the outer element,
instead you need to do something like:
<beans:beans
xmlns="http://mina.apache.org/ftpserver/spring/v1"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://mina.apache.org/ftpserver/spring/v1
http://mina.apache.org/ftpserver/ftpserver-1.0.xsd
"
>
<beans:bean class="mypackage.MyClass" id="myClass1" />
<server
id="myServer"
max-logins="200"
anon-enabled="false"
max-anon-logins="0"
max-login-failures="3"
login-failure-delay="500"
>
<user-manager>
<beans:bean class="mypackage.MyUserManager">
<beans:property name="maxLogin" value="20" />
<beans:property name="maxLoginPerIp" value="15" />
<beans:property name="directoryService" ref="myClass1" />
</beans:bean>
</user-manager>
</server>
</beans:beans>
/niklas