简体   繁体   中英

How to connect to FTP in a Java EE compliant way?

According to the Java EE (EJB) spec, it is not allowed to "listen on a socket, accept connections on a socket, or use a socket for multicast". What is the Java EE compliant way to open a FTP connection?

I'd say a Java EE compliant way to make an FTP connection is through Java EE Connector Architecture(JCA) by using the appropriate ftp adapter.

However the support for JCA is mostly left to the Application Server vendor and I am not sure about the portability your code will have.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM