views:

473

answers:

4

I am having my web application deployed on Tomcat5.5 and I use it in integration with eclipse 3.2.Each time I close the eclipse and restart it, I need to republish the application even when it hasn't been modified.

Is there a way to avoid this or any step I am missing ?

A: 

Do eclipse 3.3 or 3.4, or later versions of WTP behave the same way for you?

Stephen Denne
yes, it behaved the same way on Eclipse 3.3.1.1
Nrj
A: 

As this is a quite old question and still filed under unanswered, I'd like to broaden the scope with this answer:

I assume there is a reason for you to want to cut out republishing of your application that I don't know (other than the aversion against unnecessary work being done)

The only thing I can guess is that it takes a significant amount of time. For me the publishing time has never been an issue, but if they are for you, you might think about

  • increasing your memory (if swapping virtual memory slows republishing) - e.g. buying new RAM
  • optimize dependencies in your project, e.g. prepackage dependent projects if there's a huge number of them or create subprojects and depend upon them if there's only one huge project. (This assumes, that any of these factors slows republishing. I have not measured it)
  • does using Tomcat6 or glassfish help?

It might be, that not publishing is your issue but startup time. You might gain a lot by controlling that very tightly, e.g. starting services on demand after the webapplication has started. I know several applications that do some heavy work during startup (before they accept their first connection and before they pass control on to the next application startup that might do the same). I hate them. Usually such services get lots of swear words and finally their own web/application server. Having to restart one of these applications should at least not make all the other applications (and their users) suffer that are written with nice startup times in mind.

If your question is still an issue and you are still looking for a solution, please comment. What is your republishing time?

Olaf
The problem certainly is the amount of time it spent during the publishing and synchronization of the app whenever the eclipse is restarted. Its more of a concern since it does this act even when there is no code change.We have about 200Mb webapp and it takes 20 min to publish on 2gb ram machine.
Nrj
+1  A: 

Go to Preferences->Server->Launching . Remove option 'Automatically Publish When Starting Server'

Adi
It does prevent publishing at start up but it does not reflects changes in which I make in JSP. For this I need to restart the tomcat and guess what .. it again goes to the same publishing loop. :(So not of much help !!
Nrj
+1  A: 

I think adij.wordpress.com correctly nailed this one. If you find that you're spending a lot of time waiting for Tomcat to restart as you develop your application, consider using Jetty instead. It'll restart in a fraction of the time Tomcat does and provides a full featured alternative that is ideal for agile development.

We use Glassfish (Tomcat based) with multiple EAR files and it's dog slow for development so each EAR project contains a Jetty launcher that simply fires up for the single WAR the developer is working on at the time. If you use IntelliJ this can be made automatic so that changes at any tier of the application can be instantly reflected into the currently running application in the time it takes to click onto the browser and refresh the page.

Gary Rowe