You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by Florin Vancea <fv...@maxiq.ro> on 2003/07/09 14:40:49 UTC

Patch for JBoss starting too slow

The issue with JBoss starting too slow is still unsolved and I thought I'd
try something about that.

I am attaching a patch and the reasoning follows below.

When starting the container, ContainerRunner polls on a URL with the
isAvailable(URL) function. This function returns TRUE when it succeeds to
read from that URL, but it does not care if the reply was something like a
500 error.

Maybe that is OK for most containers, but when I'm trying on JBoss+Tomcat,
the startup sequence is: start embedded Tomcat first, then load and
configure the Cactified WAR (after some considerable delay).
The consequence is that the test URL seems to be available, but in fact is
merely returning the ERROR 500 page, since the Cactified context is still
loading.
Therefore, the sequence of tests is starting too soon and the first test
fails with another ERROR 500. In the meanwhile the context "wakes up" and
the following tests are OK. I have to mention that it's not test's fault.
The tests are running OK with an alerady-started, already-deployed setup.

I suggest that ContainerRunner.isAvailable(URL) should test also the result
code and I suspect it was meant to, but never got there.

I also attach a patch (not necessarily the best approach :) ).

Thanks,
Florin

P.S. Seems that the JMX bean that I posted earlier (last week) was not
considered a good approach by anyone. Some feedback would have been nice,
though. I hope this one _will_ get some kind of answer (any, including "quit
bugging us").

Re: Patch for JBoss starting too slow

Posted by Florin Vancea <fv...@maxiq.ro>.
Thanks for the callback, anyway.
I got around some issues by patching my own copy of Cactus, others were
taken care of by Christopher.

Florin

----- Original Message -----
From: "Vincent Massol" <vm...@pivolis.com>
To: "'Cactus Developers List'" <ca...@jakarta.apache.org>
Cc: <fv...@maxiq.ro>
Sent: Saturday, September 13, 2003 6:21 PM
Subject: RE: Patch for JBoss starting too slow


> Hi Florin,
>
> I was busy when you submitted all these nice ideas and patches on the
> cactus mailing list so I may not have been as responsive as I should
> have. I am just checking now if everything is working fine for you and
> whether there's any pending thing to commit?
>
> >From looking at the source code, it seems Chris has committed your patch
> for the URL check.
>
> Thanks
> -Vincent
>
> > -----Original Message-----
> > From: Florin Vancea [mailto:fvancea@maxiq.ro]
> > Sent: 09 July 2003 15:42
> > To: Cactus Developers List
> > Subject: Re: Patch for JBoss starting too slow
> >
> > Hi Chris,
> >
> > ----- Original Message -----
> > From: "Christopher Lenz" <cm...@gmx.de>
> > To: "Cactus Developers List" <ca...@jakarta.apache.org>
> > Sent: Wednesday, July 09, 2003 4:08 PM
> > Subject: Re: Patch for JBoss starting too slow
> >
> >
> > [snip]
> >
> > > I agree, and actually I thought it was doing that already ;-)
> > >
> > > So this also makes it unnecessary to expose the wait times, as
> discussed
> > before?
> >
> > I guess so. At least it works fine for me.
> >
> > >
> > > > I also attach a patch (not necessarily the best approach :) ).
> > >
> > > The patch looks good, and I'll commit it. Thanks!
> >
> > Great!
> >
> > >
> > > > Thanks,
> > > > Florin
> > > >
> > > > P.S. Seems that the JMX bean that I posted earlier (last week) was
> not
> > > > considered a good approach by anyone. Some feedback would have
> been
> > nice,
> > > > though. I hope this one _will_ get some kind of answer (any,
> including
> > "quit
> > > > bugging us").
> > >
> > > I've read your message and had a quick glimpse at the javadocs, but
> > haven't
> > > had the time to look in more detail, which would be necessary to
> give
> > any
> > > kind of half-intelligent feedback :-P
> >
> > Now I know who was bothering to look at them (I was kind of monitoring
> the
> > accesses) :)
> >
> > Actually after I took a deeper look at the Cactus-integration sources
> I
> > see
> > that hot-deployment is not provisioned for in the current
> architecture, so
> > my bean is not that useful for Cactus.
> > I myself am currently pre-deploying (with JMX wait) before launching
> the
> > <cactus...> task. It works well (with JBoss pre-started) and IMO
> there's
> > no
> > reason for doing any changes.
> > Maybe I jumped the gun a little when suggesting the inclusion of JMX
> wait.
> > Now I realize that not all containers may support hot-deploy and
> that's
> > not
> > Cactus's concern anyway since pre-deployment is possible.
> >
> > >
> > > Don't give up yet!
> >
> > Won't, thanks.
> >
> > Florin
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-dev-help@jakarta.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org


Re: Patch for JBoss starting too slow

Posted by Christopher Lenz <cm...@gmx.de>.
Vincent Massol wrote:
> Hi Florin,
> 
> I was busy when you submitted all these nice ideas and patches on the
> cactus mailing list so I may not have been as responsive as I should
> have. I am just checking now if everything is working fine for you and
> whether there's any pending thing to commit?
> 
>>From looking at the source code, it seems Chris has committed your patch
> for the URL check.

Yup :-)

-- 
Christopher Lenz
/=/ cmlenz at gmx.de


Re: Patch for JBoss starting too slow

Posted by Florin Vancea <fv...@maxiq.ro>.
Thanks for the callback, anyway.
I got around some issues by patching my own copy of Cactus, others were
taken care of by Christopher.

Florin

----- Original Message -----
From: "Vincent Massol" <vm...@pivolis.com>
To: "'Cactus Developers List'" <ca...@jakarta.apache.org>
Cc: <fv...@maxiq.ro>
Sent: Saturday, September 13, 2003 6:21 PM
Subject: RE: Patch for JBoss starting too slow


> Hi Florin,
>
> I was busy when you submitted all these nice ideas and patches on the
> cactus mailing list so I may not have been as responsive as I should
> have. I am just checking now if everything is working fine for you and
> whether there's any pending thing to commit?
>
> >From looking at the source code, it seems Chris has committed your patch
> for the URL check.
>
> Thanks
> -Vincent
>
> > -----Original Message-----
> > From: Florin Vancea [mailto:fvancea@maxiq.ro]
> > Sent: 09 July 2003 15:42
> > To: Cactus Developers List
> > Subject: Re: Patch for JBoss starting too slow
> >
> > Hi Chris,
> >
> > ----- Original Message -----
> > From: "Christopher Lenz" <cm...@gmx.de>
> > To: "Cactus Developers List" <ca...@jakarta.apache.org>
> > Sent: Wednesday, July 09, 2003 4:08 PM
> > Subject: Re: Patch for JBoss starting too slow
> >
> >
> > [snip]
> >
> > > I agree, and actually I thought it was doing that already ;-)
> > >
> > > So this also makes it unnecessary to expose the wait times, as
> discussed
> > before?
> >
> > I guess so. At least it works fine for me.
> >
> > >
> > > > I also attach a patch (not necessarily the best approach :) ).
> > >
> > > The patch looks good, and I'll commit it. Thanks!
> >
> > Great!
> >
> > >
> > > > Thanks,
> > > > Florin
> > > >
> > > > P.S. Seems that the JMX bean that I posted earlier (last week) was
> not
> > > > considered a good approach by anyone. Some feedback would have
> been
> > nice,
> > > > though. I hope this one _will_ get some kind of answer (any,
> including
> > "quit
> > > > bugging us").
> > >
> > > I've read your message and had a quick glimpse at the javadocs, but
> > haven't
> > > had the time to look in more detail, which would be necessary to
> give
> > any
> > > kind of half-intelligent feedback :-P
> >
> > Now I know who was bothering to look at them (I was kind of monitoring
> the
> > accesses) :)
> >
> > Actually after I took a deeper look at the Cactus-integration sources
> I
> > see
> > that hot-deployment is not provisioned for in the current
> architecture, so
> > my bean is not that useful for Cactus.
> > I myself am currently pre-deploying (with JMX wait) before launching
> the
> > <cactus...> task. It works well (with JBoss pre-started) and IMO
> there's
> > no
> > reason for doing any changes.
> > Maybe I jumped the gun a little when suggesting the inclusion of JMX
> wait.
> > Now I realize that not all containers may support hot-deploy and
> that's
> > not
> > Cactus's concern anyway since pre-deployment is possible.
> >
> > >
> > > Don't give up yet!
> >
> > Won't, thanks.
> >
> > Florin
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-dev-help@jakarta.apache.org
>
>
>



RE: Patch for JBoss starting too slow

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Florin,

I was busy when you submitted all these nice ideas and patches on the
cactus mailing list so I may not have been as responsive as I should
have. I am just checking now if everything is working fine for you and
whether there's any pending thing to commit?

Re: Patch for JBoss starting too slow

Posted by Florin Vancea <fv...@maxiq.ro>.
Hi Chris,

----- Original Message -----
From: "Christopher Lenz" <cm...@gmx.de>
To: "Cactus Developers List" <ca...@jakarta.apache.org>
Sent: Wednesday, July 09, 2003 4:08 PM
Subject: Re: Patch for JBoss starting too slow


[snip]

> I agree, and actually I thought it was doing that already ;-)
>
> So this also makes it unnecessary to expose the wait times, as discussed
before?

I guess so. At least it works fine for me.

>
> > I also attach a patch (not necessarily the best approach :) ).
>
> The patch looks good, and I'll commit it. Thanks!

Great!

>
> > Thanks,
> > Florin
> >
> > P.S. Seems that the JMX bean that I posted earlier (last week) was not
> > considered a good approach by anyone. Some feedback would have been
nice,
> > though. I hope this one _will_ get some kind of answer (any, including
"quit
> > bugging us").
>
> I've read your message and had a quick glimpse at the javadocs, but
haven't
> had the time to look in more detail, which would be necessary to give any
> kind of half-intelligent feedback :-P

Now I know who was bothering to look at them (I was kind of monitoring the
accesses) :)

Actually after I took a deeper look at the Cactus-integration sources I see
that hot-deployment is not provisioned for in the current architecture, so
my bean is not that useful for Cactus.
I myself am currently pre-deploying (with JMX wait) before launching the
<cactus...> task. It works well (with JBoss pre-started) and IMO there's no
reason for doing any changes.
Maybe I jumped the gun a little when suggesting the inclusion of JMX wait.
Now I realize that not all containers may support hot-deploy and that's not
Cactus's concern anyway since pre-deployment is possible.

>
> Don't give up yet!

Won't, thanks.

Florin



---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org


Re: Patch for JBoss starting too slow

Posted by Christopher Lenz <cm...@gmx.de>.
Hi Florin,

Florin Vancea wrote:
> The issue with JBoss starting too slow is still unsolved and I thought I'd
> try something about that.
> 
> I am attaching a patch and the reasoning follows below.
> 
> When starting the container, ContainerRunner polls on a URL with the
> isAvailable(URL) function. This function returns TRUE when it succeeds to
> read from that URL, but it does not care if the reply was something like a
> 500 error.
> 
> Maybe that is OK for most containers, but when I'm trying on JBoss+Tomcat,
> the startup sequence is: start embedded Tomcat first, then load and
> configure the Cactified WAR (after some considerable delay).
> The consequence is that the test URL seems to be available, but in fact is
> merely returning the ERROR 500 page, since the Cactified context is still
> loading.
> Therefore, the sequence of tests is starting too soon and the first test
> fails with another ERROR 500. In the meanwhile the context "wakes up" and
> the following tests are OK. I have to mention that it's not test's fault.
> The tests are running OK with an alerady-started, already-deployed setup.
> 
> I suggest that ContainerRunner.isAvailable(URL) should test also the result
> code and I suspect it was meant to, but never got there.

I agree, and actually I thought it was doing that already ;-)

So this also makes it unnecessary to expose the wait times, as discussed before?

> I also attach a patch (not necessarily the best approach :) ).

The patch looks good, and I'll commit it. Thanks!

> Thanks,
> Florin
> 
> P.S. Seems that the JMX bean that I posted earlier (last week) was not
> considered a good approach by anyone. Some feedback would have been nice,
> though. I hope this one _will_ get some kind of answer (any, including "quit
> bugging us").

I've read your message and had a quick glimpse at the javadocs, but haven't 
had the time to look in more detail, which would be necessary to give any 
kind of half-intelligent feedback :-P

Don't give up yet!

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org