File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Speed Up Development with Hot Deploy ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Speed Up Development with Hot Deploy ? " Watch "Speed Up Development with Hot Deploy ? " New topic
Author

Speed Up Development with Hot Deploy ?

Pete Neu
Ranch Hand

Joined: Feb 18, 2005
Posts: 86
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

Joined: Jan 10, 2002
Posts: 61413
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375
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

Joined: Dec 11, 2004
Posts: 13410

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.




Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Pete Neu
Ranch Hand

Joined: Feb 18, 2005
Posts: 86
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

Joined: Dec 11, 2004
Posts: 13410

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Speed Up Development with Hot Deploy ?