Hello,
I'm
currently trying to migrate a Java EE application from Payara platform
to WildFly. Our application is running on Java EE 8 and as such we are
trying to use WildFly 26.1.2.Final as our current target version. The
problem I've found is that the exact same war used to deploy the
application into payara fails to start on wildfly. We have a
ServletContextListener class annotated with @WebListener that loads the
required system configurations on startup, mainly database and cache
connection details, however it never runs on wildfly, only payara. There
are no "metadata-complete" definitions on the web.xml, and manually
specifying a <listener> tag also doesn't work.
The listener class definition is essentially the following, there are no funky custom logic, just a simple "contextInitialized".
@WebListener
public class ServletListener implements ServletContextListener {
@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {
carregarConfiguracoes(); // load config file
inicializarCache(); // initialize cache
}
}
Any help is very much appreciated.