[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Lifecycle aspects revisited
kabir.khan@jboss.com
do-not-reply at jboss.com
Sat Feb 10 16:48:42 EST 2007
Another issue at the moment is if something for example has both lifecycle-configure and aop:lifecycle-install aspects.
In this case setKernelControllerContext() gets called both during configure and install, with no real way to controll which of the lifecycle aspects to call. This could be handled at aspect level, since we have access to the KernelControllerContext, but that seems slightly ugly. Would it make sense to make these methods more finegrained? i.e.
| public interface ConfigureKernelControllerContextAware extends KernelControllerContextAware
| {
| void setConfigureKernelControllerContext(KernelControllerContext context) throws Exception;
| void unsetConfigureKernelControllerContext(KernelControllerContext context) throws Exception;
| }
|
| public interface InstallKernelControllerContextAware extends KernelControllerContextAware
| {
| void setInstallKernelControllerContext(KernelControllerContext context) throws Exception;
| void unsetInstallKernelControllerContext(KernelControllerContext context) throws Exception;
|
| ...
| }
WRT my previous post the default pointcut for a lifecycle-configure would then become
| execution(* CLASSES_VALUE->$implements{org.jboss.kernel.spi.dependency.ConfigureKernelControllerContextAware}(..))"
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014270#4014270
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014270
More information about the jboss-dev-forums
mailing list