Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tomcat webapp's deployment on the fly with C++

Status
Not open for further replies.

kira1983

Programmer
Jul 19, 2005
6
FR
Hi,
I can't stop Tomcat because there are other aplications which are running.
I want to deploy my web aplication. I have a .war file. I want to do the same as the manager of the tomcat home page.
I could deploy myself the webapp but I think you have to tell Tomcat his context has changed.
thanks
 
I would advise against hot deployments in a live situation - its inherently dangerous, and I don't really trust Tomcat's context class loaders during hot deployment.
Plus, if you have an global JNDI based resources mapped to contexts, Tomcat seems to drop the mappings.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Thanks for the fast answer.
But I have to deliver the webapp to a client who doesn't want to stop Tomcat. What can I do?
 
Explain to them the reason why it is a seriously bad idea to do hot deployment.

After all, if you were making cars, and your client said "make sure the brakes don't work" - you would politely refuse them, and explain why brakes are a good idea, would you not ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
yes I understand. But imagine they had hundred of webapps executing in Tomcat. I mean 'commercial' webapps!
You can understand that they don't want (even if you explain the technical point of view) to stop Tomcat! And I think it's precisely our situation.

But when you speak of 'and I don't really trust Tomcat's context class loaders during hot deployment.' what do you mean precisely? and for precision we don't use JNDI.
thanks
 
>>>>> I don't really trust Tomcat's context class loaders during hot deployment.

I wouldn't trust Tomcat in a LIVE situation to :
1) Always, without fail, correctly load the webapp when hot-deploying
2) Always, without fail, guarantee that a hot-deployment of webappA would not interfere with webappB or webappC.

There are loads of pages out there banging on about hot-deployment - why don't you read some of them :
Sometimes, you just have to realise that sites will get downtime. Or if they don't they need a server farm, two clusters - one live and one live-hot-standby - and you deploy to which ever is not running, and then flick the switch.


--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
I al thinking into telling the problem to the client but i'm not sure if they would listen to the Truth path...
A client is a client: when he wants somoething he doesn't care if it's stupid or not...

thanks a lot for the help anyway
 
You can use the tomcat manager console to stop and restart an application by context. I don't kno wif it will deploy a war file but it will pick up changed files including web.xml if you explode the war file yourself

try it on your test box first!

\0
 
NullTerminator :

Did you not read the rest of the discussion in this thread then ?

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top