On Thu, Jun 16, 2011 at 14:36, Pid <p...@pidster.com> wrote:
[...]
>>>
>>> An application might report that it's started, even it hasn't finished
>>> initialising.
>>>
>>
>> That is the application's responsibility, so not the problem at hand.
>
> What is the value of indicating success or failure, if the answer is
> only partially true?  You can't know for certain whether the answer you
> have is meaningful, so it's useless.
>

I have a manichean point of view on this: an application is ready to
operate when its initialization phase is complete, or it's not.
Success, or failure. I'm not even taking OSGi and this sort of things
into account here. If the application uses OSGi, fine. What I expect
of it is to tell it's ready to answer any requests that may be thrown
at it.

>
>> Furthermore, if the application reports a successful start even though
>> it is not completely initialized, i consider this an application
>> fault, therefore not my concern.
>
> That makes no sense to me.
>

See above.

>
>> As the person being responsible for
>> the good behavior of applications in production, I expect webapps that
>> I deploy to behave correctly, ie fail to deploy in the event of an
>> initialization failure.
>
> That seems contradictory, but it's probably my misunderstanding.
>

How so? Again, see above.

>
> Tomcat won't provide me with this information,
>> EXCEPT if I use the manager webapp (in text mode, of course) to deploy
>> it, as I can parse the return "message".
>
> Yes it will, using the same mechanism that the manager webapp uses; you
> can interact with Tomcat over JMX, the API gives you detailed
> information about applications.
>

I just _don't_ _care_. I don't want to have to use JMX to monitor
webapp state in this case (although I _do_ use it for monitoring
purposes, which is a HUGE difference). I wish Tomcat to be able to
report, with startup-configured web applications, whether these
webapps were successfully deployed -- at _startup_ time -- and exit
with a meaningful error code if one or more of these webapps were NOT
deployed correctly. And yes, I rely on these webapp's startup
procedures to report failures as well.

To put an analogy with device drivers, what you basically say is "I
initialize the driver without a firmware and don't care whether the
initialization succeeds, I'll see that when the firmware loads". I
say, "a driver is considered initialized iif the basic initialization
is OK, _and_ the firmware is loaded and functional". This is a HUGE
difference. The fact that the device may fail at run time is akin to
running JMX for webapp monitoring, and this can happen as well. But I
want a _guarantee_ that the device, when the init routine returns, is
fully ready to operate.

-- 
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
f...@one2team.com
40 avenue Raymond Poincaré
75116 Paris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to