You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Phlogiston Eight <ph...@live.com> on 2008/09/30 16:19:35 UTC

Using FTPServer on a J2EE Application Server

I understand Apache FTPServer can be run on a J2EE Application Server.
 
How would one deploy it to an App Server?  Do you make the FTPServer instance a bean?  Also, because FTPServer itself spawns multiple threads (one for ea. new request, at least)--wouldn't the ApplicationServer forbid this...throw exceptions?
 
Who has successfully deployed and run Apache FTPServer on a WebServer or J2EE application server such as Tomcat, WebSphere, GlassFish, etc...?  How did you deploy it?  Is it a separate module, if so what kind, what config do you have to do on the server, etc...
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/

Re: Using FTPServer on a J2EE Application Server

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Wed, Oct 1, 2008 at 12:43 AM, David Latorre <dv...@gmail.com> wrote:
> Sure,I can send you an example tomorrow. Is there any place where I can send
> a war file? Maybe a new Jira issue about documentation?

Jira issue with the ASF donation button checked would be great!

> Anyway, my listener pre-dates the change towards Spring-configuration  and
> there should be ways (I'm not familiar with Spring) to deploy ftpserver in a
> war through  XML configuration solely.

I would prefer it to use the Java API directly so that's perfect.

/niklas

Re: Using FTPServer on a J2EE Application Server

Posted by David Latorre <dv...@gmail.com>.
Sure,I can send you an example tomorrow. Is there any place where I can send
a war file? Maybe a new Jira issue about documentation?
Anyway, my listener pre-dates the change towards Spring-configuration  and
there should be ways (I'm not familiar with Spring) to deploy ftpserver in a
war through  XML configuration solely.



2008/9/30 Niklas Gustavsson <ni...@protocol7.com>

> On Tue, Sep 30, 2008 at 4:41 PM, David Latorre <dv...@gmail.com> wrote:
> >  I have successfully deployed FTPServer on Tomcat , Glassfish and a
> modified
> > version of Sun Java App Server 8...
>
> Is this something that you could turn into a smallish example and
> donate to the project? I would love to have a example WAR application
> around as there tend to be frequent questions about such a beast.
>
> /niklas
>

Re: Using FTPServer on a J2EE Application Server

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Tue, Sep 30, 2008 at 4:41 PM, David Latorre <dv...@gmail.com> wrote:
>  I have successfully deployed FTPServer on Tomcat , Glassfish and a modified
> version of Sun Java App Server 8...

Is this something that you could turn into a smallish example and
donate to the project? I would love to have a example WAR application
around as there tend to be frequent questions about such a beast.

/niklas

Re: Using FTPServer on a J2EE Application Server

Posted by David Latorre <dv...@gmail.com>.
Hello Phlogiston,

 I have successfully deployed FTPServer on Tomcat , Glassfish and a modified
version of Sun Java App Server 8 which was the only one with a
SecurityManager installed.
In order for FTPServer to work with a security manager I had to grant the
following permissions:grant {
        permission java.lang.RuntimePermission "writeFileDescriptor";
        permission java.lang.RuntimePermission "readFileDescriptor";
        permission java.lang.RuntimePermission "modifyThread";
};

Although I had several grants already so it could be more in your case.
Maybe this is interesting for the documentation by the way.

Apart from this,  running FTPServer inside an AppServer is straight forward
( We used to Java some problems with the versions working on Mina for Java
1.4 but everything is working fine in the latest releases).

Thanks to Spring, you can deploy FTPServer as a rar file:
http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/jca/context/SpringContextResourceAdapter.html

Which should be the best option, although I haven't tried this yet.


I deploy it inside a war file, the "web application" has a context listener
which will load ftpserver when the context is initialized and will stop the
server when the context is destroyed. This way, I can even have a Servlet
that reloads ftpserver after configuration changes.


I hope I was of any help.



2008/9/30 Phlogiston Eight <ph...@live.com>

>
> I understand Apache FTPServer can be run on a J2EE Application Server.
>
> How would one deploy it to an App Server?  Do you make the FTPServer
> instance a bean?  Also, because FTPServer itself spawns multiple threads
> (one for ea. new request, at least)--wouldn't the ApplicationServer forbid
> this...throw exceptions?
>
> Who has successfully deployed and run Apache FTPServer on a WebServer or
> J2EE application server such as Tomcat, WebSphere, GlassFish, etc...?  How
> did you deploy it?  Is it a separate module, if so what kind, what config do
> you have to do on the server, etc...
> _________________________________________________________________
> Stay up to date on your PC, the Web, and your mobile phone with Windows
> Live.
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/