[Design the new POJO MicroContainer] - Annotation scanning
by alesj
OK, this issue is quite a blocker for few other JIRAs, and probably a good API changing candidate, meaning it needs to be done before CR1. :-)
Not to mention that it spans over many areas, from AOP, EJBs, Seam, ... and even our MC will benefit from it.
So, resolving this would relieve the pita of many. ;-)
The initial discussion about starting this solution in classloading:
- http://www.jboss.com/index.html?module=bb&op=viewtopic&t=132400
And the root JIRA issue:
- http://jira.jboss.com/jira/browse/JBCL-9
So, what would be a good entry point into this in our classloading?
Part of ClassLoadingPolicy?
And the user hooks?
We discussed it could be similar to Java6 APR:
e.g.
-
http://java.sun.com/javase/6/docs/api/javax/annotation/processing/RoundEn...
But instead on compiling, we could do this on class loading.
And we should also consider our instance annotations. Which can kick in as late as in real deployment stage.
How does this relate with the work we've done in metadata project?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145436#4145436
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145436
16 years, 5 months
[Design the new POJO MicroContainer] - fromContext dependency regression
by adrian@jboss.org
I'm seeing a horrible regression in the fromContext dependency injection.
e.g. this config from the system-jmx tests in the appserver
| <?xml version="1.0" encoding="UTF-8"?>
|
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
|
| <!-- The legacy JMX kernel -->
| <bean name="ServiceControllerLocator" class="org.jboss.test.system.controller.integration.support.ServiceControllerLocator" />
|
| <bean name="ServiceLifecycle" class="org.jboss.test.system.controller.integration.support.TestServiceControllerLifecycleCallback">
| <property name="mbeanServer">
| <inject bean="ServiceControllerLocator" property="mbeanServer"/>
| </property>
| <property name="serviceController">
| <inject bean="ServiceControllerLocator" property="serviceController"/>
| </property>
| </bean>
|
| <bean name="TransactionManager" class="org.jboss.test.system.controller.integration.support.MockTransactionManager">
| <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager", exposedInterface=org.jboss.test.system.controller.integration.support.MockTransactionManagerMBean.class, registerDirectly=true)</annotation>
| <property name="transactionTimeout">300</property>
| <property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
| <install bean="ServiceLifecycle" method="install">
| <parameter><inject fromContext="context"/></parameter>
| </install>
| <uninstall bean="ServiceLifecycle" method="uninstall">
| <parameter><inject fromContext="context"/></parameter>
| </uninstall>
| </bean>
|
| </deployment>
|
is causing a circular dependency of the bean on itself.
| AbstractDependencyItem@e59e40{name=TransactionManager dependsOn=TransactionManager whenRequired=Installed dependentState=Installed resolved=false}
|
Each FromContext enumeration value should have an associated state
when it becomes valid. Most will be PreInstall, but some like BeanInfo
will Instantiated.
Something like:
[code
public enum FromContext
{
...
BEANINFO(FromContextDelegate.BEANINFO, ControllerState.INSTANTIATED),
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145168#4145168
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145168
16 years, 5 months