Some guidance I can give you...
You have to implement the PoolableObjectFactory interface.

  Object makeObject() throws Exception;
=> connect /login

  void destroyObject(Object obj) throws Exception;
=> logout / disconnect

  boolean validateObject(Object obj);
=> ftp.sendNoOp

  void activateObject(Object obj) throws Exception;
=> ftp.setFileType
=> ftp.setFileTransferMode
=> ...

  void passivateObject(Object obj) throws Exception;
=> if transfer not complete then ftp.abort();

Just implements the ftp transfer as a standalone program and then move the code into the factory, then you can use this factory for constructing the pool.

In this case you pool the FTPClients, this is assuming you have a pool of clients all connecting to the same host with the same user/password.

If you have different host/user combinations then you have to implement a KeyedPoolableObjectFactory with as key a host/user object.

-- Dirk

Jonathan Easterling wrote:

Hello,
Has anyone out there done an implementation of the Connection Pool stuff for 
FTP? Any guidance / examples would be greatly appreciated.
Thanks
Jon



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to