title: Wildfly 8.2 - ScriptEngineManager.getEngineFactories is empty on server startup
body: <p>I am facing a weird behavior with Wildfly 8.2.1 running on Java 8 (Open JDK). I am specifically mentioning Java 8, because I did not see this issue on Java 7.</p>
  
  <p>While my Wildfly module is being started, I have code that loads up JavaScripts using the Java RhinoScriptEngine. </p>
  
  <pre><code>    List&lt;ScriptEngineFactory&gt; engineFactories = engineManager.getEngineFactories();
      ScriptEngine scriptEngine = engineManager.getEngineByName("js");
  </code></pre>
  
  <p>Since <code>scriptEngine</code> was being assigned as <code>null</code>, I added debug logs and noticed that <code>engineFactories</code> is just an empty <code>List</code>(well, the <code>engineFactories</code> itself is being fetched only for debugging purposes). But, after the startup of the module is complete, this exact code works, and lists the <code>RhinoScriptEngineFactory</code>.</p>
  
  <p>Is there something that has been changed in Java 8 that Wildfly 8.2 is not aware of, or do I need to add explicit dependencies to my module?</p>