Search code examples
jbossjboss7.xwildflywildfly-10undertow

If I am not using some modules,Is it mandatory to have all modules in wildfly10.1.0 standalone.xml?


Can anyone please help me out here ? If I am not using some modules as part of our application development , is it mandatory to have all modules extensions in standalone.xml ? If not , what is benefit we will get if we remove some unused modules and there extensions like I want to remove module="org.jboss.as.ejb3" , module="org.jboss.as.jsf" ,etc. If I clean my standalone.xml Is there any benefit I will get with respect to application performance and memory ?


Solution

  • Wildfly uses modular architecture, using submodules and services as feature blocks. Some are started eagerly i.e. even if your app does not need them, some are lazy i.e. they will no be initialized unless some deployment requests them(You can observe it in the server log after your server boots up).
    The startup process is asynchronous and hence should be relatively fast on any reasonable hardware. That being said, nothing stops you from creating your own profile or distribution with just the submodules you need(you can for example remove everything but servlet subsystem if that is the only api you need, or remove all javaee subsystems and just use undertow as loadbalancer). However unless you are really working in a very restricted environment - where disk space or memory is very limited, I do not think it is worth spending your time on. In any real world scenario, your App memory requirements will make server overhead negligible.
    First focus on your app and then (if you still need it) spent time on server tuning. Chances are, the default Wildfly config will work just fine:)
    Happy hacking