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.
While my Wildfly module is being started, I have code that loads up JavaScripts using the Java RhinoScriptEngine.
List<ScriptEngineFactory> engineFactories = engineManager.getEngineFactories();
ScriptEngine scriptEngine = engineManager.getEngineByName("js");
Since scriptEngine
was being assigned as null
, I added debug logs and noticed that engineFactories
is just an empty List
(well, the engineFactories
itself is being fetched only for debugging purposes). But, after the startup of the module is complete, this exact code works, and lists the RhinoScriptEngineFactory
.
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?