[
https://issues.jboss.org/browse/TEIID-4441?page=com.atlassian.jira.plugin...
]
Kylin Soong commented on TEIID-4441:
------------------------------------
I have concern of how to to implement the FTP VirtualFile, need your weight.
Current FTP VirtualFile not reference a real physic file, rather than reference a
Inputstream, which opened by FTP session(FTPClient), but FTPClient.retrieveFileStream must
be call complete command after stream be closed:
{code}
FTPClient client = ...
try {
InputStream in = client.retrieveFileStream("pathToFile");
...
in.close()
} finally {
client.completePendingCommand();
}
{code}
More details from [1], especially the sentence "To finalize the file transfer you
must call completePendingCommand and check its return value to verify success"
So if we create a JDBC connection, try to open more stream, there will be a error throw, I
think my initial thoughts that cache ftp file to local tmp filesystem may be good solution
for this issue.
[1]
http://commons.apache.org/proper/commons-net/apidocs/org/apache/commons/n...
Add FTP/SFTP based access to the File Resource Adapter
------------------------------------------------------
Key: TEIID-4441
URL:
https://issues.jboss.org/browse/TEIID-4441
Project: Teiid
Issue Type: Enhancement
Components: Misc. Connectors
Reporter: Ramesh Reddy
Assignee: Kylin Soong
Fix For: Open To Community, 9.2
This has been requested few times in the community, it would be nice to give provide this
functionality. Using
http://commons.apache.org/proper/commons-net/ seems to be right
decision.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)