You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Khlystov Alexandr <ak...@ovservice.org> on 2009/04/19 18:56:30 UTC
15 second for redeployment is to much
Hello guys.
I can't fix my maven2+wicket application to be redeployed less than 15
seconds, but I want it to take 5 seconds at least.
Could someone provide the fastest in the world practise of webapp on
Tomcat redeployment???
Precondition ( inital deployment): copy war dir with my webapp into
tomcat directory.
How redeployment time is spent:
1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
2. 0 second copy *.class file into Tomcat/webapps
3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
files are changed
4. 1 seconds takes to undeploy my webapp
5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
Beans frameworks with my data)
So it is too much I think.
Any ideas??
Thanks in advance.
--
Khlystov Alexandr
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: 15 second for redeployment is to much
Posted by Khlystov Alexandr <ak...@ovservice.org>.
Thanks, Kees!
I'll implement your advices, and will reply with results.
Kees Jan Koster пишет:
> Dear Khlystov,
>
>> 1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
>> 2. 0 second copy *.class file into Tomcat/webapps
>
> Stop using Maven for simple compiles and write a small shell script
> that just calls javac with the webapp's WEB-INF/classes as output dir.
>
>> 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
>> files are changed
>
> There is a timer somewhere that you can lower for this. I forget
> precisely which one. It will slow down Tomcat a bit, but you will
> redeploy faster.
>
>> 4. 1 seconds takes to undeploy my webapp
>> 5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
>> Beans frameworks with my data)
>
>
> Well, you chose these frameworks, so you'll have to live with their
> startup times. Lazy initialisation *may* help, if you initialise more
> than you need for a specific test.
>
> --
> Kees Jan
>
> http://java-monitor.com/forum/
> kjkoster@kjkoster.org
> 06-51838192
>
> Rule 1 for being in a hole: stop digging.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
Khlystov Alexandr
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: 15 second for redeployment is to much
Posted by Khlystov Alexandr <ak...@ovservice.org>.
Thanks, for reply Pid.
Hardware is fast enough 2 Gb RAM, 2 Ghz CPU dual core athlon 64.
Sorry, I did not get your message. What do you think is not meaningful?
Some times and need to redeploy webapp 10 times in 10 minutes.
Pid пишет:
> Kees Jan Koster wrote:
>
>> Dear Khlystov,
>>
>>
>>> 1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
>>> 2. 0 second copy *.class file into Tomcat/webapps
>>>
>> Stop using Maven for simple compiles and write a small shell script that
>> just calls javac with the webapp's WEB-INF/classes as output dir.
>>
>>
>>> 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
>>> files are changed
>>>
>> There is a timer somewhere that you can lower for this. I forget
>> precisely which one. It will slow down Tomcat a bit, but you will
>> redeploy faster.
>>
>>
>>> 4. 1 seconds takes to undeploy my webapp
>>> 5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
>>> Beans frameworks with my data)
>>>
>> Well, you chose these frameworks, so you'll have to live with their
>> startup times. Lazy initialisation *may* help, if you initialise more
>> than you need for a specific test.
>>
>
> 1. Use faster hardware?
>
> Why are you setting an arbitrary target time for rebuilding your
> application and how is this actually meaningful?
>
> I don't understand why this would matter, can you explain?
>
>
> p
>
>
>
>
>> --
>> Kees Jan
>>
>> http://java-monitor.com/forum/
>> kjkoster@kjkoster.org
>> 06-51838192
>>
>> Rule 1 for being in a hole: stop digging.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
--
Khlystov Alexandr
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: 15 second for redeployment is to much
Posted by Pid <p...@pidster.com>.
Kees Jan Koster wrote:
> Dear Khlystov,
>
>> 1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
>> 2. 0 second copy *.class file into Tomcat/webapps
>
> Stop using Maven for simple compiles and write a small shell script that
> just calls javac with the webapp's WEB-INF/classes as output dir.
>
>> 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
>> files are changed
>
> There is a timer somewhere that you can lower for this. I forget
> precisely which one. It will slow down Tomcat a bit, but you will
> redeploy faster.
>
>> 4. 1 seconds takes to undeploy my webapp
>> 5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
>> Beans frameworks with my data)
>
>
> Well, you chose these frameworks, so you'll have to live with their
> startup times. Lazy initialisation *may* help, if you initialise more
> than you need for a specific test.
1. Use faster hardware?
Why are you setting an arbitrary target time for rebuilding your
application and how is this actually meaningful?
I don't understand why this would matter, can you explain?
p
> --
> Kees Jan
>
> http://java-monitor.com/forum/
> kjkoster@kjkoster.org
> 06-51838192
>
> Rule 1 for being in a hole: stop digging.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: 15 second for redeployment is to much
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andre-John,
On 4/19/2009 7:25 PM, Andre-John Mas wrote:
> This is one reason I would like to see a "file change" listener as
> standard in Java.
You'd have to wait for a "file change" listener as standard in an OS, too.
> The idea is that for systems providing a native file
> listener, such as Unix system which offer "kernel notifications" this
> would be used, and as a fall-back a timer task would be used. I am not
> aware of any current cross-platform implementations of this approach.
Are there any such standards?
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkns0JgACgkQ9CaO5/Lv0PBZtQCgj6SmEuTzaOcqzNRSbKi/JOe5
TicAniYk/sLUc7tah8YZVi3WJ25TxJDx
=XcGV
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: 15 second for redeployment is to much
Posted by Andre-John Mas <aj...@sympatico.ca>.
On 19-Apr-2009, at 14:57, André Warnier wrote:
> Hi.
>
> I am far from being the specialist here, but my inner application
> designer core revolts at the idea of having a thread in Tomcat busy
> at nothing else but checking 86,400 times a day, just in case you
> redeploy an application from time to time.
> There must exist a more efficient mechanism for doing that.
> One should probably check how the Tomcat Manager deploys an
> application on-demand, and use the same mechanism e.g.
This is one reason I would like to see a "file change" listener as
standard in Java. The idea is that for systems providing a native file
listener, such as Unix system which offer "kernel notifications" this
would be used, and as a fall-back a timer task would be used. I am not
aware of any current cross-platform implementations of this approach.
> I'm curious to see Chuck's reaction to this thread.
>
> Khlystov Alexandr wrote:
>> I have 10 seconds now instead of 15 with 2 of 3 options:
>> backgroundProcessorDelay="1"
>> <Context docBase="hello-webapp" path="/hello-webapp"
>> reloadable="true" antiJARLocking="true"
>> backgroundProcessorDelay="1"/>
>> and
>> lazy-init for all beans.
>> Cool! thanks again.
>> Now I'm going to sleep, and will implement javac direct compilation
>> tomorrow.
>> Kees Jan Koster пишет:
>>> Dear Khlystov,
>>>
>>>> 1. 5 second (using maven) compile source ( usually it is 1 or 2
>>>> files )
>>>> 2. 0 second copy *.class file into Tomcat/webapps
>>>
>>> Stop using Maven for simple compiles and write a small shell
>>> script that just calls javac with the webapp's WEB-INF/classes as
>>> output dir.
>>>
>>>> 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
>>>> files are changed
>>>
>>> There is a timer somewhere that you can lower for this. I forget
>>> precisely which one. It will slow down Tomcat a bit, but you will
>>> redeploy faster.
>>>
>>>> 4. 1 seconds takes to undeploy my webapp
>>>> 5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
>>>> Beans frameworks with my data)
>>>
>>>
>>> Well, you chose these frameworks, so you'll have to live with
>>> their startup times. Lazy initialisation *may* help, if you
>>> initialise more than you need for a specific test.
>>>
>>> --
>>> Kees Jan
>>>
>>> http://java-monitor.com/forum/
>>> kjkoster@kjkoster.org
>>> 06-51838192
>>>
>>> Rule 1 for being in a hole: stop digging.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: 15 second for redeployment is to much
Posted by Gregor Schneider <rc...@googlemail.com>.
On Sun, Apr 19, 2009 at 9:43 PM, Caldarale, Charles R
<Ch...@unisys.com> wrote:
>
> How about pointless? Somewhat akin to debating the number of angels that can dance on the head of a pin.
>
Why pointless? The answer is obvious: 42
scnr...
Gregor
--
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: 15 second for redeployment is to much
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: André Warnier [mailto:aw@ice-sa.com]
> Subject: Re: 15 second for redeployment is to much
>
> I'm curious to see Chuck's reaction to this thread.
How about pointless? Somewhat akin to debating the number of angels that can dance on the head of a pin.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: 15 second for redeployment is to much
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
André,
On 4/19/2009 2:57 PM, André Warnier wrote:
> There must exist a more efficient mechanism for [redeploying webapps in Tomcat].
> One should probably check how the Tomcat Manager deploys an application
> on-demand, and use the same mechanism e.g.
Or, since the OP is using Maven (which can use/is using ant), you could
use the ant task for Tomcat redeployment on demand, rather that relying
on Tomcat's auto-redeployment to pick up webapp changes and to its own
redeployment.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkns0P8ACgkQ9CaO5/Lv0PDhPQCfbShzOfkMxurAPdUO1Wur2yD4
eqoAoJj/VGTA/B5OVl0aXPxaVnQpz60N
=ZOJm
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: 15 second for redeployment is to much
Posted by André Warnier <aw...@ice-sa.com>.
Hi.
I am far from being the specialist here, but my inner application
designer core revolts at the idea of having a thread in Tomcat busy at
nothing else but checking 86,400 times a day, just in case you redeploy
an application from time to time.
There must exist a more efficient mechanism for doing that.
One should probably check how the Tomcat Manager deploys an application
on-demand, and use the same mechanism e.g.
I'm curious to see Chuck's reaction to this thread.
Khlystov Alexandr wrote:
>
> I have 10 seconds now instead of 15 with 2 of 3 options:
>
> backgroundProcessorDelay="1"
> <Context docBase="hello-webapp" path="/hello-webapp" reloadable="true"
> antiJARLocking="true" backgroundProcessorDelay="1"/>
>
> and
> lazy-init for all beans.
>
> Cool! thanks again.
>
> Now I'm going to sleep, and will implement javac direct compilation
> tomorrow.
>
> Kees Jan Koster пишет:
>> Dear Khlystov,
>>
>>> 1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
>>> 2. 0 second copy *.class file into Tomcat/webapps
>>
>> Stop using Maven for simple compiles and write a small shell script
>> that just calls javac with the webapp's WEB-INF/classes as output dir.
>>
>>> 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
>>> files are changed
>>
>> There is a timer somewhere that you can lower for this. I forget
>> precisely which one. It will slow down Tomcat a bit, but you will
>> redeploy faster.
>>
>>> 4. 1 seconds takes to undeploy my webapp
>>> 5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
>>> Beans frameworks with my data)
>>
>>
>> Well, you chose these frameworks, so you'll have to live with their
>> startup times. Lazy initialisation *may* help, if you initialise more
>> than you need for a specific test.
>>
>> --
>> Kees Jan
>>
>> http://java-monitor.com/forum/
>> kjkoster@kjkoster.org
>> 06-51838192
>>
>> Rule 1 for being in a hole: stop digging.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: 15 second for redeployment is to much
Posted by Khlystov Alexandr <ak...@ovservice.org>.
I have 10 seconds now instead of 15 with 2 of 3 options:
backgroundProcessorDelay="1"
<Context docBase="hello-webapp" path="/hello-webapp" reloadable="true"
antiJARLocking="true" backgroundProcessorDelay="1"/>
and
lazy-init for all beans.
Cool! thanks again.
Now I'm going to sleep, and will implement javac direct compilation
tomorrow.
Kees Jan Koster пишет:
> Dear Khlystov,
>
>> 1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
>> 2. 0 second copy *.class file into Tomcat/webapps
>
> Stop using Maven for simple compiles and write a small shell script
> that just calls javac with the webapp's WEB-INF/classes as output dir.
>
>> 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
>> files are changed
>
> There is a timer somewhere that you can lower for this. I forget
> precisely which one. It will slow down Tomcat a bit, but you will
> redeploy faster.
>
>> 4. 1 seconds takes to undeploy my webapp
>> 5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
>> Beans frameworks with my data)
>
>
> Well, you chose these frameworks, so you'll have to live with their
> startup times. Lazy initialisation *may* help, if you initialise more
> than you need for a specific test.
>
> --
> Kees Jan
>
> http://java-monitor.com/forum/
> kjkoster@kjkoster.org
> 06-51838192
>
> Rule 1 for being in a hole: stop digging.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
Khlystov Alexandr
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: 15 second for redeployment is to much
Posted by Kees Jan Koster <kj...@gmail.com>.
Dear Khlystov,
> 1. 5 second (using maven) compile source ( usually it is 1 or 2
> files )
> 2. 0 second copy *.class file into Tomcat/webapps
Stop using Maven for simple compiles and write a small shell script
that just calls javac with the webapp's WEB-INF/classes as output dir.
> 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
> files are changed
There is a timer somewhere that you can lower for this. I forget
precisely which one. It will slow down Tomcat a bit, but you will
redeploy faster.
> 4. 1 seconds takes to undeploy my webapp
> 5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
> Beans frameworks with my data)
Well, you chose these frameworks, so you'll have to live with their
startup times. Lazy initialisation *may* help, if you initialise more
than you need for a specific test.
--
Kees Jan
http://java-monitor.com/forum/
kjkoster@kjkoster.org
06-51838192
Rule 1 for being in a hole: stop digging.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: 15 second for redeployment is to much
Posted by Ronald Klop <ro...@base.nl>.
Fix for step 3. Don't wait for Tomcat to detect changes. See http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html or use org.apache.catalina.ant.ReloadTask (which uses the manager). My compile command automaticly calls this after a succesful compile.
Another tip: test business logic (*.java) with junit. Don't start Tomcat for it. And for GUI code you normaly don't need to redeploy your webapp. Tomcat can dynamicly compile jsp and other template engines often can do that too.
Ronald.
Op zondag, 19 april 2009 18:56 schreef Khlystov Alexandr :>
>
> Hello guys.
>
> I can't fix my maven2+wicket application to be redeployed less than 15 seconds, but I want it to take 5 seconds at least.
>
> Could someone provide the fastest in the world practise of webapp on Tomcat redeployment???
>
> Precondition ( inital deployment): copy war dir with my webapp into tomcat directory.
>
> How redeployment time is spent:
>
> 1. 5 second (using maven) compile source ( usually it is 1 or 2 files )
> 2. 0 second copy *.class file into Tomcat/webapps
> 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
> files are changed
> 4. 1 seconds takes to undeploy my webapp
> 5. 3-5 seconds takes to deploy ( really initialize Wicket & Spring
> Beans frameworks with my data)
>
> So it is too much I think.
>
> Any ideas??
>
> Thanks in advance.
>
> --
> Khlystov Alexandr
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>
>
Re: 15 second for redeployment is to much
Posted by János Löbb <ja...@yale.edu>.
> 3. 5-7 seconds waiting while Tomcat finds that my webapp deployed
> files are changed
If You run quartz it can look in a shorter time if Your webapp
deployed or not.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org