Nick, please see (and review) the attached latest draft which has
changes in this area.
Answers inline.
On Fri, Nov 14, 2008 at 2:14 AM, Nicklas Karlsson <nickarls(a)gmail.com> wrote:
Some question on bean removal / contexts:
* 8.2 says destroying a context calls all Bean.destroy methods. Is it
implied that they are also removed from the context?
Or are the bean instances just flagged "destroyed"?
8.1 says:
"The Context implementation is responsible for destroying any Web Bean
instance it creates by passing the instance to the destroy() method of
the Bean object representing the Web Bean. A destroyed instance must
not subsequently be returned by the get() method."
Perhaps 8.2 could be slightly more explicit, but I think 8.1 captures it, right?
* How is a bean removed from a context manually? Currently, there is
no API on ManagerImp/NormalContext for this, should there be?
Right, it is not supported.
* Calling a bean destroy method manually does nothing extra from
lifecycle point of view?
"extra" in what sense? What is a "bean destroy method"?
* Calling an EJB remove method triggers the (currently non-existent)
remove method on the Manager impl which then calls the destroy method
and removes the bean from the context (with the currently
non-existent) Context impl remove method?
This requirement could not be implemented without a Context.remove()
method, and so I have removed it from the spec.
* Can a bean be removed from a context that is not currently active?
No.
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org