Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop wildfly war from initializing mojarra

Whenever I deploy a war to wildfly 8 or 10 (in this case it's a jax-rs service), I see the following line

[javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 151) Initializing Mojarra 2.2.11-jbossorg-1 20150505-1501 for context

Since JSF is not used in the application, is there a way to stop mojarra from being initialized?

like image 267
Chris Pike Avatar asked Jan 27 '17 20:01

Chris Pike


2 Answers

Add a jboss-deployment-structure.xml file to your WEB-INF folder to stop deployment for a single war

<jboss-deployment-structure>
  <deployment>
    <exclude-subsystems>
      <subsystem name="jsf" />
    </exclude-subsystems>
  </deployment>
</jboss-deployment-structure>
like image 159
Chris Pike Avatar answered Nov 15 '22 06:11

Chris Pike


You can remove

<subsystem xmlns="urn:jboss:domain:jsf:1.0"/>

from your profile. It should stop Mojarra initialization.

like image 20
jithin iyyani Avatar answered Nov 15 '22 04:11

jithin iyyani