tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50836] LifecycleState#isAvailable() to be more restrictive
Date Sat, 26 Feb 2011 20:34:32 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50836

--- Comment #4 from Mark Thomas <markt@apache.org> 2011-02-26 15:34:28 EST ---
(In reply to comment #3)
> The "public" methods: I think those are methods that perform some work, like
> AccessLog#log(), not just any public methods.  Or you are talking about JMX
> here?

I was quoting from the Lifecycle Javadoc. What is meant by public methods is
not defined but I take it to mean "any public method that isn't a property
setter/getter or a lifecycle methods". That could be better defined in the
Lifecycle Javadoc.

> Regarding STARTING:
> 
> I think that in STARTING it is too early to call those methods:  the component
> has not completed its start up.

It should be OK. Do you have an example of where it isn't?

> E.g, if AccessLogValve#startInternal() is overriden in some child class,
> STARTING state will be set by AccessLogValve#startInternal(), before the child
> class method completes.

Providing the class follows the guidelines in the Javadoc for Lifecycle and
LifecycleBase that should be fine.

> Regarding STOPPING_PREP: 
> 
> My only concern is that the previous state might be FAILED. When transitioning
> FAILED -> STOPPING_PREP the availability flag suddenly becomes "true".

I think we could safely move from FAILED to STOPPING in that case. It means
changing the permitted Lifecycle transitions slightly but from a quick look at
the code it should be ok.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Mime
View raw message