[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Too strict pattern matching in PackageClassFilter

jaikiran do-not-reply at jboss.com
Thu Feb 5 06:26:09 EST 2009


Posting here in continuation to this thread in the user forum http://www.jboss.com/index.html?module=bb&op=viewtopic&t=149468#4207208. Other than this there are some more users (of JBossAS5.0 GA) who have reported that the package filtering isn't working as expected.

A bit of background:

* The WAR deployer allows (and used to allow in JBossAS4.x) a "filteredPackages". 

<property name="filteredPackages">javax.servlet,org.apache.commons.logging</property>
  | 

This configuration would ensure that if the user had packaged a jar containing any classes belonging to javax.servlet.* package (and child packages), then those classes would be filtered/ignored. 

* In 5.0 GA, users have reported that this doesn't work anymore. The forum thread has more details. As explained in that thread, the PackageClassFilter is not filtering child packages. For ex: If the user had filteredPackages = javax.servlet then the PackageClassFilter filters only classes belonging to javax.servlet but not the ones in javax.servlet.http. In my opinion, the PackageClassFilter regex needs to be changed to allow this (there's a patch in the other forum thread). This would allow users to add a filter on the top most package and not worry about any child packages. 

* The comments on the original version of that class made me believe that the current behaviour was intended (though i don't know the reason). 



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

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



More information about the jboss-dev-forums mailing list