[ https://issues.apache.org/activemq/browse/SM-921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved SM-921. -------------------------------- Resolution: Fixed Fix Version/s: 3.2 Assignee: Guillaume Nodet URL: http://svn.apache.org/viewvc?view=rev&rev=526151 > FTPClientPool does not have dataTimeout and controlEncoding properties. > ------------------------------------------------------------------------- > > Key: SM-921 > URL: https://issues.apache.org/activemq/browse/SM-921 > Project: ServiceMix > Issue Type: Bug > Components: servicemix-components > Affects Versions: 3.1 > Reporter: Alper Sogukpinar > Assigned To: Guillaume Nodet > Fix For: 3.2 > > > FTPClientPool does not set FtpClient __dataTimeout property and If timeout > value is not set, infinite timeout will be the case. > As a result of that not only the thread which is in infinite timeout > condition is affected and ftp connection remains open forever but also the > file which is put into the workingSet by the thread will not be processed by > latter FtpPoller threads. > I tried both FtpClient.setDataTimeout and FtpClient.setSoTimeout properties > in my tests and only FtpClient.setDataTimeout was worked. > Creating a DEFAULT_TIMEOUT property and setting dataTimeout just after > opening the ftp connection will solve the problem. > In addition to this a bean property which overrides DEFAULT_TIMEOUT should > be created for user configuration. > In ddition to these, DEFAULT_CONTROL_ENCODING property should also be created > on FTPClientPool for setting controlEncoding property of FtpClient object. > Otherwise, non US ASCII characters which are used in the name of a target > file causes problems. For example Default encoding does not support Turkish > characters. When non US ASCII characters like Turkish charachers (ş, > ı, ğ....) are used in the fileName, each of them is converted to > '?' character and '?' is not acceptable for a fileName. As a result of that > an exception is thrown... > ******************************************* > Sample Code... > public class FTPClientPool { > private static int DEFAULT_TIMEOUT = 600*1000; > private static String DEFAULT_CONTROL_ENCODING = "Cp1254"; > > public SocketClient borrowClient() throws Exception { > > FTPClient client = null; > try { > client = new FTPClient(); > client.setControlEncoding(DEFAULT_CONTROL_ENCODING); > > if (getConfig() != null) { > client.configure(getConfig()); > } > super.connect(client); > client.setDataTimeout(DEFAULT_TIMEOUT); > ..................... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.