[ 
https://issues.apache.org/activemq/browse/SM-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38745
 ] 

James Bradt commented on SM-875:
--------------------------------

Guillaume and Juergen,

It will poll for files within a compressed archive.  It will also write (add) 
new files to a compress archive.  Although I havent tried it out, according to 
the docs, it also supports the normal various compression algo's that are 
available today.

For polling, if I set the directory to target/myArchive.zip and that zip file 
contains, for example, 4 xml files within that zip, then it will create a 
separate message for each of the 4 xml files.  If I set my directory to 
target/myArchive.zip/someSubArchiveDir, it will look for files only in that 
subdirectory of the archive.

I came across truezip last night as I was looking for functionality to write 
messages to zip files for archival purposes.  It appears that VFS doesnt 
support writing of zip files.  Also, there were some concerns, as was pointed 
about above, about the cache layer.

I decided to use truezip toolset as it extends the normal java.io.File.  It was 
very easy to implement.  Basically, all I needed to do was copy the normal file 
binder and substitute the File class with TrueZip's File class.

I did see the note about limitations.  In my testing so far, I have not 
encounter any issues.  But I am also not an expert in class loaders and will 
gladly welcome any comments on how we can address this caveat.

I don't know how well I could refactor this into a marshaler.  I thought that 
marshelers are more for modifying the message contents and preparing the 
message for binding.  Right now, the TrueZIP component, as I am using it, works 
more at the file reading/writing level.  I understand your concerns, just don't 
have the expertise as of yet to know if I can take truezip's compression engine 
and use it stand alone.  I will need to investigate.
 
As for the dynamic endpoint resolution, the code that I used was a direct copy 
of the File component so I was expecting to have that logic there already.  Can 
someone, maybe in a dev-list thread or wiki page, explain how dynamic endpoint 
resolution is process and how to code for it?

Again, I am not an expert in all things java, just a developer that needs to 
get things done.  I appreciate the comments and I am willing to modify the 
submission.  I am very impressed with ServiceMix's capabilities and I want to 
give back to the community.  Also, if there is enough concern that this doesn't 
fit in well with SM's capabilities, I don't have any problem with throwing it 
into the bit bucket.

James

> TrueZIP binding component
> -------------------------
>
>                 Key: SM-875
>                 URL: https://issues.apache.org/activemq/browse/SM-875
>             Project: ServiceMix
>          Issue Type: New Feature
>    Affects Versions: 3.1
>            Reporter: James Bradt
>         Attachments: trueZip-smx.zip
>
>
> suggest new binding component using TrueZIP toolset - allows files to be 
> read/written to compressed archives

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to