[jboss-dev] jars in sars visible from ears, my arse!

Adrian Brock abrock at redhat.com
Tue Sep 22 08:34:01 EDT 2009


The simple answer is to define your <context-root/> 
in a WEB-INF/jboss-web.xml

Your real problem is that before you had an ear that was in the
"DefaultDomain". But since isolation got turned on by default 
that is no longer true, each ear gets its own 
isolated classloading domain.

It's an ear because you have a META-INF/application.xml (regardless of
what extension you put on the end).

So the other alternative is to keep your application.xml
and put the ear back in the "DefaultDomain"
using a META-INF/jboss-classloading.xml (for the ear in your case) 
similar to the second solution here:
http://www.jboss.org/community/wiki/useJBossWebClassLoaderinJBoss5

On Tue, 2009-09-22 at 13:26 +0100, Andrew Dinn wrote:
> On 09/21/2009 05:42 PM, Andrew Dinn wrote:
> >> Right, the application.xml will cause the deployment to be treated as an
> >> EAR. You don't need this for sars, they deploy all nested content
> >> anyway, so deleting it should solve the issue.
> >
> > Thanks, Jason and Anil. This did the trick and it now works.
> 
> Hmm, this didn't quite fix everything. The problem is that my servlets 
> are being mapped to a context path composed as follows
> 
>    http://<web-host>:<web-port>/<sar-name>-<war-name>/<servicename>
> 
> e.g.
> 
>    http://127.0.0.1:8080/jbossxts-ws-c11/ActivationService
> 
> Previously, my application.xml was using module:web:context-root entries 
> to map them explicitly to a context path composed as
> 
>    http://<web-host>:<web-port>/<war-name>/<servicename>
> 
> e.g.
> 
>    http://127.0.0.1:8080/ws-c11/ActivationService
> 
> In most cases this does not matter. However, in the case of the cited 
> example it matters because this particular path is visible to clients.
> 
> So, if I use application.xml or jboss-app.xml to specify the context 
> path I cannot see my jars. If I omit these config files I cannot specify 
> the context path. Is there a way round this dilemma?
> 
> regards,
> 
> 
> Andrew Dinn
> -----------
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss by Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list