Thursday, April 07, 2011

Force JBoss to load your lib jars

If you're running JBoss and you want it to favor librarires that go with your WAR instead of using what JBoss bundled with. Add this jboss-web.xml to your WEB-INF dir


<jboss-web>
<class-loading java2classloadingcompliance="false">
<loader-repository>
org.terracotta:archive=all-in-one.war
<loader-repository-config>
java2ParentDelegation=false
</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>

Substitute "org.terracotta" for your package name and "all-in-one.war" for your WAR