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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...