What I'd like to do is exclude the application server's 1.0.com.sun.codemodel package (from jaxb-xjc.jar) from the classpath for my application and use the one that is bundled in my library path instead. Do I put that package in the before-filter or after-filter element?
You need something like this:
<?xml version="1.0" encoding="UTF-8"?>
<classloading-domain xmlns="urn:jboss:classloading-domain:1.0" name="your-domain-name">
<parent-policy>
<before-filter>
<javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.classloader.plugins.filter.NegatingClassFilter">
<constructor>
<parameter>
<javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.classloader.spi.filter.PackageClassFilter">
<constructor>
<parameter>1.0.com.sun.codemodel</parameter>
</constructor>
</javabean>
</parameter>
</constructor>
</javabean>
</before-filter>
</parent-policy>
</classloading-domain>