Re: Any simple way to make Spring auto-call start() on FtpServer when it is registered using the server tags? Follow-up, Ralph Palmer: No--the XML config

2008-10-16 Thread David Latorre
Hello Brad, Actually Ralph's idea sounds great (why does it need to be a DisposableBean, Ralph? my knowledge of Spring is = null) and it start FtpServer automatically , no need to provide a Main class. He builds a web application with that single file and the changes stated in his mail (yeah,

Re: Any simple way to make Spring auto-call start() on FtpServer when it is registered using the server tags? Follow-up, Ralph Palmer: No--the XML config

2008-10-16 Thread Niklas Gustavsson
On Thu, Oct 16, 2008 at 1:50 PM, David Latorre [EMAIL PROTECTED] wrote: Niklas I do think that using Spring lifecycle is better than a ContextListener. For example, with Spring it is very easy to deploy the whole thing as a resource adapter instead of a web-application . Spring v2

Re: Any simple way to make Spring auto-call start() on FtpServer when it is registered using the server tags? Follow-up, Ralph Palmer: No--the XML config

2008-10-16 Thread Ralph
David, I implemented DisposableBean when I added a destroy method in FtpWrapper to stop the FTP server when Tomcat was stopped. Again, probably a better way shrug. Cheers, Ralph public void destroy() throws Exception { try { System.out.println(Stopping ftp

Re: Any simple way to make Spring auto-call start() on FtpServer when it is registered using the server tags?

2008-10-15 Thread Niklas Gustavsson
On 10/14/08, Sisk, Brad [EMAIL PROTECTED] wrote: Can anyone recommend a simple way to force Spring to automatically call FTPServer.start() when Spring gets an instance of it through BeanFactory? Keep in mind, FTPServer is not registered with Spring through the applicationContext, but rather

Re: Any simple way to make Spring auto-call start() on FtpServer when it is registered using the server tags?

2008-10-15 Thread Ralph
Brad Sisk Wrote: I appreciate your suggestion, Ralph. But if I'm not mistaken, it looks like you've posted a solution for a standalone Java app-not the Spring approach to bean instantiation. For example, your solution directly instantiates FtpServer the way a main() method would-rather than using

Any simple way to make Spring auto-call start() on FtpServer when it is registered using the server tags?

2008-10-14 Thread Sisk, Brad
Can anyone recommend a simple way to force Spring to automatically call FTPServer.start() when Spring gets an instance of it through BeanFactory? Keep in mind, FTPServer is not registered with Spring through the applicationContext, but rather using the server /server element configuration file.