I am working with Jboss JBoss EAP 6.4.5.GA (AS 7.5.5.Final-redhat-3)
and I have a problem with web.xml.
Here is the part of web.xml that I have:
<servlet>
<servlet-name>Servlet1</servlet-name>
<servlet-class>classPath.servlet1</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet>
<servlet-name>Servlet2</servlet-name>
<servlet-class>classPath.servlet2</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
When I start the JBOSS server, I see that my configuration is not preserved, because sometimes Servlet2 starts before Servelt1, but this should not happen. When I delete data, tmp and logs catalogs and then start JBOSS it starts Servlet1 before Servlet2, but after JBOSS restart I see Servlet2 is running before Servlet1.
Have someone ever had that kind of situation or similar and can help me with this? Maybye there is a special tag, which can tells the JBOSS "start Servelet2 exaclly after Servlet1" and it's not 'load-on-startup'
".
* EDIT * I have to add interesting info about this situation. In debug mode in fresh start (delete those catalogs) first init() method starts in Servlet1 and after it in Servlet2, but after JBOSS reboot only init() in Servlet2 starts and I don't know why...