Is there a way to enforce a deployment order in tomcat6?

后端 未结 7 1809
灰色年华
灰色年华 2020-12-01 16:37

I have 3 wars in my webapp folder. Two of them are built on services of the third one. I\'m in a testing environment, i.e. I don\'t have control over their architectures, so

7条回答
  •  盖世英雄少女心
    2020-12-01 17:07

    Apologies for cross posting (Tomcat - starting webapps in a specific order), but I thought it was relevant here too:

    You can define mulitple services in your server.xml, which run on different ports. The services are started sequentially according to the order they appear in the server.xml. This means that you can have - for example - a configuration service running in the first service and then the apps that depend on it in the second (I use the default Catalina one for the rest of them...)

    You can see more info here: http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q27

    And this is the service that I include before the Catalina Service:

    
        
        
            
    
                
            
        
    
    

    As you can see, I use docbase rather than appBase, but you should be able t configure a different appBase if you prefer...

    NB it's important to change the name of both the service and the engine.

    HTH

提交回复
热议问题