[Design the new POJO MicroContainer] - Re: Fine grained action aware interfaces (JBMICROCONT-134)
by adrian@jboss.org
"bkeh12" wrote : Hi,adrian
| Where are you ?
| alesj wrote : Currently all interfaces extend KernelControllerContextAware, which is convenient for simple awareness, but might not be that useful in all cases.
| Do you agree this!
| Can talk to us, please.
Personally, I have little interest in this feature. :-)
I think it is an anti-pattern of IOC for the "POJO" to implement container interfaces.
I understand that sometimes it is useful, but only for people that are trying to
"extend" the container without modifying the container itself,
e.g. using AOP to add the interface as a mixin so you can pick and choose
which beans get certain processing.
Without more concrete usecases of these features it is difficult to come to
any conclusion on what this api should really look like.
The only reason I added it in the first place was because it mirrored the
MBeanRegistration interface from JMX.
The whole question then became more complicated when the
"JMX Introduction" aspect couldn't decide whether it wanted be invoked
at construction or configuration. :-)
So we extended the api such that you could get a callback on any of the state transitions.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002883#4002883
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002883
19 years, 2 months
[Design the new POJO MicroContainer] - Re: Recent changes Microcontainer
by adrian@jboss.org
"alesj" wrote : Using KernelConfigFactory to get KernelConfig (which can provide this)?
|
| Putting KernelConfig instance into Configurator?
| It's a 'loop' usage. Looks wrong.
|
| I see we are already using KernelConfig as a parameter.
| Doing it the same here (adding it as a parameter in resolveProperty method)?
| If I do this (just tried), then almost every method in Configurator needs it. Yuck.
|
| Any other ways / ideas?
|
It is the KernelConfigurator that has this information.
The problem is that the current code uses a static singleton as a delegate
AbstractKernelConfigurator -> Configurator
so one way to fix would be to move the code to the AbstractKernelConfigurator
that needs kernel specific config.
Perhaps a simpler solution is to expose the TypeInfoFactory on the TypeInfo interface.
You would then be able to do
| TypeInfoFactory typeInfoFactory = beanInfo.getClassInfo().getTypeInfoFactory();
| TypeInfo typeInfo = typeInfoFactory.getTypeInfo(name, classLoader);
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002844#4002844
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002844
19 years, 2 months