[jboss-user] [JBoss Microcontainer Development] New message: "Re: How to migrate AssembledDirectory"

John Bailey do-not-reply at jboss.com
Tue Mar 2 09:47:07 EST 2010

User development,

A new message was posted in the thread "How to migrate AssembledDirectory":


Author  : John Bailey
Profile : http://community.jboss.org/people/johnbailey

A better long-term approach would be to move to using ShrinkWrap archives to declaratively create ear/war/jar archives.  ShrinkWrap already has fluent API to add classes/resources to an archive.
JavaArchive archive = Archives.create("archive.jar", JavaArchive.class) 

I have also written a VFS3 based filesystem that uses ShrinkWrap archives for a backing.  This allows you to take an archive an mount it into the VFS wherever you like.  Once mounted you can simply deploy the VirtualFile pointing to the mounted FileSystem.

JavaArchive archive = ...
VirtualFile archiveFile = VFS.getChild("/vfs/path").getChild(archive.getName());
VFS.mount(archiveFile, new ArchiveFileSystem(archive, tempDir));

I need to work with Andrew to figure out where the ArchiveFileSystem should live long term, but I do think this is the best long term testing strategy for creation of test archives.  Since we are suggesting ShrinkWrap be used for customers to test through embedded, it would be a good idea to do the same where possible.  This will also reduce the number of competing implementations of the same functionality.


To reply to this message visit the message page: http://community.jboss.org/message/529374#529374

More information about the jboss-user mailing list