This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Web application start order in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Tomcat
Bookmark "Web application start order in Tomcat" Watch "Web application start order in Tomcat" New topic

Web application start order in Tomcat

Pablo M�ller
Ranch Hand

Joined: Dec 12, 2006
Posts: 63
I have several applications deployed in a tomcat 5.5 that depend on another application. The problem is that I can't make this one to be the first to start. I've been reading tomcat's documentation, searching google and the forum, and I only found a post on a mailing list saying that this can't be, done but it was a couple years old. Is there any way to specify the start order of the applications?

2B || !2B
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42958
On my own installation the order is alphabetical, although I'm not sure if that's incidental or not. I'm unaware of a way to change the order - a look at the source would tell for sure.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63202

Why the dependency? That's a really fragile setup.

I'd explore ways to remove the dependency, or at least to render startup order moot.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Pablo M�ller
Ranch Hand

Joined: Dec 12, 2006
Posts: 63
You're right, It's fragile... I'm working on it, I was looking for a workaround to solve the problem in the meantime.... is there any?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

There isn't one.
This gets discussed every so often on the Tomcat mailing list.

The answer is alway the same, code your apps in such a way that one doesn't rely on another.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Web application start order in Tomcat
It's not a secret anymore!