简体   繁体   中英

load on startup negative value in liberty

I am currently migrating my application from WAS 8 to WAS Liberty, and I am stuck with the below problem. In one of my module web.xml file, the servlet load on startup value is -1. And the particular servlet is not getting invoked while running in Liberty. Can anyone help me with this? Please find the below code snippets from my web.xml, <servlet> <servlet-name>SchedulerServlet</servlet-name> <display-name>SchedulerServlet</display-name> <servlet-class>com.metlife.bob.reassignment.scheduler.servlet.SchedulerServlet</servlet-class> <load-on-startup>-1</load-on-startup> </servlet>

Any negative value for load-on-startup means to defer loading the servlet until the first request is received, so unless something is invoking the servlet, it's not going to start on its own. You can override this behavior in Liberty with the deferServletLoad attribute in server.xml as described in this IBM KnowledgeCenter topic https://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_servlet_load.html As an aside, I noticed the name of your servlet includes "Scheduler" and you're migrating from traditional WebSphere to Liberty, I'm assuming you are aware that Liberty does not have a direct equivalent for traditional WebSphere scheduler service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM