]
Daniel Bevenius commented on JBESB-533:
---------------------------------------
I've added the class DeleteOnEvictTreeCacheListener, which is a TreeCacheListener.
This listener will upon receiving a node evict event also remove the data from the node.
The use case for this is in our case that the files created on the ftpserver will be
archived once per day. So we could set the maxAgeSeconds (in ftpfile-cache-config.xml)
property to say two days. After two days the file names are removed from the cache.
There could also be a case when the files are archived on the ftpserver after a certain
number of files have been created. In this case one could set the maxNodes to the
appropriate amount.
Classes of interest:
DeleteOnEvictTreeCacheListener
DeleteOnEvictTreeCacheListenerTest
FTP bus that is read-only (no rename, post-delete etc)
------------------------------------------------------
Key: JBESB-533
URL:
http://jira.jboss.com/jira/browse/JBESB-533
Project: JBoss ESB
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Adapters
Affects Versions: 4.0 Beta 1 Maintenance Pack 1
Reporter: Daniel Bevenius
Assigned To: Daniel Bevenius
Priority: Minor
Fix For: 4.2
Attachments: ftpfile_cache_test.xml, FtpFileCache.java, FtpFileCacheTest.java,
ReadOnlyRemoteFileSystemStrategy.java, ReadOnlyRemoteFileSystemStrategyTest.java,
RemoteFileSystemStrategy.java
I currently have a requirement to use the ftpbus to connect to an ftp server running on a
mainframe computer. The permissions that exists there are for the current file and it is
read only. This means that we cannot rename the file upon pickup and not move/delete after
processing it.
Proposed solutions:
1. Add a property to the ftp-message-filter, for example read-only="true".
This would probably make it more clear to the end user that the other properties like
post-delete, post-directory, work-suffix, post-delete, post-directory etc, are not valid
for this configuration. If the read-only value is true a subclass of RemoteGatewayListener
would be used. The current implementation sets the gatewayClass in the class
FtpListenerMapper line 80:
if(listener.getIsGateway()) {
listenerNode.setAttribute("gatewayClass",
RemoteGatewayListener.class.getName());
Is there another way to set the gatewayClass that I'm not aware of? I'll
investigate this and perhaps post a question to the design forum.
2. Add a strategy to the RemoteGatewayListener that handles delete and rename. The
default strategy would work like it does now but one would be able to specify a strategy
in the configuration to override it. The strategy to use would then be set in the
checkMyParams if the default strategy in not wanted.
I would appreciate any suggestions or comments.
I assigned this to myself only because I need to start on this as soon as possible.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: