[jboss-user] [JBoss AOP] - org.apache.xml excluded from precompilation?

Tom Cunningham do-not-reply at jboss.com
Tue Sep 18 15:52:14 EDT 2012


Tom Cunningham [https://community.jboss.org/people/tcunning] created the discussion

"org.apache.xml excluded from precompilation?"

To view the discussion, visit: https://community.jboss.org/message/760248#760248

--------------------------------------------------------------
I'm trying to patch over a bug in XMLBeans (  https://issues.apache.org/jira/browse/XMLBEANS-328 https://issues.apache.org/jira/browse/XMLBEANS-328 ) using pointcuts.       I've been struggling over the past couple of days to try to get aopc working on my class, even building a stub class that models the class structure of the class I'm trying to advise, which worked fine, but I still get a "no comp needed" when trying to aopc org.apache.xmlbeans.impl.store.Xobj.

Today I set some breakpoints and discovered that it is being rejected because of the package name of the class :

(from AspectManager.class)
public boolean isNonAdvisableClassName(String classname)
   {
if (ignoreClass(classname)) return true;
if (includeClass(classname)) return false;
if (excludeClass(classname)) return true;
return (classname.startsWith("org.jboss.aop.") ||
              classname.endsWith("$aop") ||
              classname.startsWith("javassist") ||
              classname.startsWith("org.jboss.util.") ||
              classname.startsWith("gnu.trove.") ||
              classname.startsWith("EDU.oswego.cs.dl.util.concurrent.") ||
              classname.contains('.' + JoinPointGenerator.JOINPOINT_CLASS_PREFIX) ||
      // System classes
              classname.startsWith("org.apache.tools.ant") ||
              classname.startsWith("org.apache.crimson") ||
              classname.startsWith("org.apache.xalan") ||
              classname.startsWith("org.apache.xml") ||
....

Everything starting with org.apache.xml seems to be filtered out - which org.apache.xmlbeans.impl.store would fall under.     Is there a reason why "org.apache.xmlbeans" should be blocked, and not just "org.apache.xml."?       Is there a way I can short circuit this by getting includeClass(classname) to return true?     I'm calling aopc through the ant task :

            <aopc compilerclasspathref="build.classpath" verbose="true">
                        <classpath path="${aopc.xbean.classes.dir}"/>
                        <src path="${aopc.xbean.classes.dir}"/>
                        <include name="Foo.class"/>
                        <include name="org/apache/xmlbeans/impl/store/Xobj$SoapBodyXobj.class"/>
                        <include name="org/apache/xmlbeans/impl/store/Xobj.class"/>
                        <aoppath path="${aop.resources.dir}/META-INF/jboss-aop.xml"/>
                        <aopclasspath path="${aop.classes.dir}"/>
                </aopc>
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/760248#760248]

Start a new discussion in JBoss AOP at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2027]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120918/fc5d6225/attachment.html 


More information about the jboss-user mailing list