[jboss-dev-forums] [Design of POJO Server] - all files that make up a deployment unit

bill.burke@jboss.com do-not-reply at jboss.com
Wed Oct 4 19:45:56 EDT 2006


I ran into a problem where I only want to scan for .class files in the DeploymentUnit but skip .class files in subdeployments.  The current VirtualFile/Visitor code could not handle this situation so I had to extend VisitorAttributes with a isRecurseArchive() option and modify the AbstractVFSContext accordingly.

Then, in my EJB Deployer I do:

unit.getDeploymentContext().getRoot().visit(FilterOnClassFileAndNoRecurseArchives);

I don't know or not if this goes against your abstract notion of things.  I'm thinking maybe that DeploymentUnit should have some new methods:

VirtualFile getResource(String name);
List getResources();
List getResources(VirtualFileFilter);

We had this discussion before, but ClassPath just won't cut it as a deployer may or may not want to distinguish between  a ClassPath manifest when scanning for deployment resources (i.e. what classes to scan anntotations for).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976200#3976200

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976200



More information about the jboss-dev-forums mailing list