• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Speed Up Development with Hot Deploy ?

 
Pete Neu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

up to now I was using tomcat for developement. But it
always takes so long on my P4 1.6 Ghz for the server
to start up each time I redeploy.

Can I gain some time if I use an application server with
hot deploy? If yes, is there any server which is
especially fast?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you'd be better served to find out why your server startup is so slow. Also, you do know that you do not need to stop and restart the server to re-deploy a context? The manager application allows you to stop and start app contexts individually.
 
K Riaz
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes this has been a long problem for me too, especially when you add new classes to a web application in Tomcat and need to restart it.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html




Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.


 
Pete Neu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I read this right you have to create a context.xml in
Tomcat 5.0\conf\Catalina\localhost and there specify the
that it should reload each time a change is done.

Do you have sample context.xml? The default installation
does not include it.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No the context element is in an xml fragment file.
The file only contains the <Context... tag (In previous versions of Tomcat this tag would have been entered in your server.xml file).

The name of the file will be the same as your application (context) name.

IE: if your app was named myApp (http://localhost:8080/myApp)
The name of the file would be "myApp.xml"
It's contents would look like this:

<Context docBase="myApp"
privileged="false"
antiResourceLocking="false"
antiJARLocking="false"
reloadable="true"/>

Most of the attributes are optional (as they have default values)
The complete list can be found here:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic