[jboss-dev-forums] [Design the new POJO MicroContainer] - In/Un callbacks should be happening at Install
adrian@jboss.org
do-not-reply at jboss.com
Wed Feb 13 09:43:14 EST 2008
The In/Uncallbacks were setup to happen at the Configured on the thing being
registered into, this is the wrong default.
We shouldn't be installing into a registry until it has had chance to
go through its lifecycle. e.g. create() can be used to validate configuration is correct
(no missing or inconsistent properties) and fail if there is a problem.
Or the registry may need to do extra work before receiving registrations,
possibly based on the value of two parameters passed during the config stage.
I've changed the default state to be Installed (this is the "no surprises" setting).
If somebody wants it to happen earlier, then can always change it in the xml
or the annotation.
Further, there were are ZERO tests of changing whenRequired and dependentState
for the callbacks.
I created one for changing the dependentState=Instantiated
(fortunately it works :-), but this obviously needs to be tested more systematically.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129158#4129158
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129158
More information about the jboss-dev-forums
mailing list