I have 5 wars in my wildfly deployment directory. But before deployment of these war files i want to call some code which will have logic of jndi and database registration for these war files.
I have one approach in which i can create one war file having jndi and database register logic and then setting its deployment priority to 1, but due to some reasons i can not go with this approach.
Please suggest me the way to do it.
If you just want to create a jndi and database registration, you can directly create a jndi in wildfly itself and use that jndi in your application. So that you don't need to create a new WAR file.
To create a JNDI in wildfly, need to edit the
standalone.xml
file located in wildfly directoryC:\wildfly\standalone\configuration\
Example: