|Restart vs Republish on Tomcat with WTP 1.5 [message #177098]
||Wed, 16 August 2006 13:39
Originally posted by: tariq.chalabi.cheshire.pnn.police.uk|
Just started using WTP plugin (1.5) with eclipse 3.1 running Tomcat 5.5
I've created a Dynamic Web Application and published it to a server.
When I make changes to JSP's and .java files - WTP recognizes that these
changes require a Republish and automatically synchronises the app with
However when I make changes to web.xml, faces-config.xml, or any other
config file - the server state just says "Restart", and I have to restart
the server for these changes to be picked up by the server. Which is a
bit tiresome after doing that 10 times an hour.
Is it possible to get WTP to republish automatically - even for when those
config files are changed
|Re: Restart vs Republish on Tomcat with WTP 1.5 [message #177116 is a reply to message #177098]
||Wed, 16 August 2006 17:02
| Darryl Miles
Registered: July 2009
Tariq Chalabi wrote:|
> However when I make changes to web.xml, faces-config.xml, or any other
> config file - the server state just says "Restart", and I have to
> restart the server for these changes to be picked up by the server.
> Which is a bit tiresome after doing that 10 times an hour.
> Is it possible to get WTP to republish automatically - even for when
> those config files are changed
Hmm... not really.
Restarting the container is the only way to guarantee the configuration
change that have been made will be picked up and in use. The
sledgehammer approach. However...
There are a few issues here:
* Eclipse modifies the contents and/or updates the timestamp on the
web.xml files unnecessarily in some scenarios. So this aspect could be
considered eclipse fixable issues.
* Tomcat does have a feature to allow the reloading of a single web-app
(without restarting the entire container). This feature is not perfect
(I wont bore the list with the details right now) but it would be
possible to make use of this feature to shave reload times down
somewhat. But Eclipse can't do that right now.
* Then into the really distant future: Tomcat could be improved in the
area of helping developers by making it possible for it to detect the
changes in the web.xml and have fine grained support to invalidate the
affected parts of the running configuration. Many configuration changes
could actually be done hot with TC running but it would require major
infrastructure changes inside tomcat.
The changes above generally wont help you much if you are using a
complex framework like Hibernate, Spring, Struts and making
configuration changes to the framework itself, but in my experience not
much overall time is spent on configuration issue (unless you don't know
what you are doing, ha ha). However there are ways, means and trick
around some of those issues. There is also out-of-container unit
testing to speed up code/debug cycles, leaving you to bolt code into a
servlet at the last minute.
The entire process of IDE <> container hot development is something that
It would definatly be possible to have a seamless end-to-end model for
development with a servlet container which is something I think everyone
But it going to take some time to be realized.
There are a number of configuration tweaks you can make to improve the
quality of life for the developer. I'm not sure anyone has documented
these thing and maybe someone should.
* Using a META-INF/config.xml
* Setting <Context ... debug="1" reloadable="true">
* Disabling Eclipse's auto-restart and auto-redeploy.
* Enabling Eclipse's auto-publish to 1 second (it would be good to have
instant continuous automatic publishing or a milliseconds timeout value)
* Making changes to the global configuration $CATALINA_HOME/conf/web.xml
for the 'jsp' servlet I added the following (dont forget to delete your
runtime instance and recreate it when you change this):
This kills the default 4 second update lag you get when you modify pages.
|Re: Restart vs Republish on Tomcat with WTP 1.5 [message #177544 is a reply to message #177295]
||Sat, 19 August 2006 11:51
| Darryl Miles
Registered: July 2009
Tariq Chalabi wrote:|
> I think that one of the best features that an IDE can offer developers
> is a quick code-build-reload cycle.
> From that point of view WTP is a bit disappointing - and perhaps I'd be
> better sticking with an ant script and using the catalina-ant tasks to
> reload the app when I want to.
Well I dont think its WTPs fault, it sounds like your configuration is
the problem. There isn't much more WTP can do to speed up this area
without involving the container. Start by disabling WTPs builtin
auto-restart/auto-deploy, but keep auto-publish on.
The container could:
* Allow resource invalidation (tag pools, .tag, .tld file reloading)
* Allow hot-deployment filter/servlet config changes
* Allow automatic JSP compliation on update
* Get involved with class/JAR file update
> I've been quite impressed with the BEA Weblogic Studio plugin. They
> have a thread called AppXRay which constantly scans an app for all the
> dependencies that may have changed e.g. hibernate mapping files,
> faces-config etc, and then does an automatic reload.
What does it reload ? The container or the web-app or just the parts of
the web-app which are affected.
You can get the TC container to reload automatically if you set
reloadable="true" but it quickly becomes a nusience, since Eclipse can
do hot code replace of .java/.class files. So its changes to other
files in the WEB-INF tree which really need a reload, but if you are
using xdoclet as well then you get excessive reloading for no reason.
I'm not sure how an ANT task makes the code-build-reload cycle better
for you, even if you put it on the External Tools button productivity is
less than the server tools for me.
Powered by FUDForum
. Page generated in 0.06491 seconds