[webbeans-issues] [JBoss JIRA] Created: (WBRI-338) Java based DSL configuration of BeanDeploymentArchive
by Takeshi Kondo (JIRA)
Java based DSL configuration of BeanDeploymentArchive
-----------------------------------------------------
Key: WBRI-338
URL: https://jira.jboss.org/jira/browse/WBRI-338
Project: Web Beans
Issue Type: Patch
Components: Bootstrap
Reporter: Takeshi Kondo
Priority: Minor
Attachments: dsl.patch
In test environment ,I frequently change configuration.
ClssLoader scan is convenience , but it is laggardly and not flexible.
Alternatively , I'd created new BeanDeploymentArchive which loads Java based DSL configuration.
sample is as follows.
-------
> Java based DSL Configuration
class TestBeanModule extends BeanModuleBase
{
@Override
protected void configure()
{
bean(TestBean.class);
}
}
-------
> TestCase
@Test(groups = "bootstrap")
public void testBeanModule()
{
new ModuleTest(new TestBeanModule())
{
@Override
protected void test()
{
BeanManagerImpl manager = CurrentManager.rootManager();
assert manager.getInstanceByType(TestBean.class) != null;
}
};
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months
[webbeans-issues] [JBoss JIRA] Created: (WBRI-370) WBClassImpl does not use AnnotationType to read annotations when creating an InjectionTarget
by Kabir Khan (JIRA)
WBClassImpl does not use AnnotationType to read annotations when creating an InjectionTarget
--------------------------------------------------------------------------------------------
Key: WBRI-370
URL: https://jira.jboss.org/jira/browse/WBRI-370
Project: Web Beans
Issue Type: Bug
Reporter: Kabir Khan
Fix For: 1.0.0.PREVIEW3
Attachments: test.txt
AnnotatedType only seems to be used to read class level annotations when creating an injection target .
WBClassImpl<T>.of(AnnotatedType<T>, ClassTransformer) line: 134
ClassTransformer$2.call() line: 72
ClassTransformer$2.call() line: 68
FutureTask$Sync.innerRun() line: 269
FutureTask<V>.run() line: 123
ConcurrentCache<K,V>.putIfAbsent(K, Callable<E>) line: 125
ClassTransformer.loadClass(AnnotatedType<T>) line: 67
BeanManagerImpl.createInjectionTarget(AnnotatedType<T>) line: 1266
WebBeansInjector<T>.getInjectionTarget(Class<T>) line: 99
public static <T> WBClass<T> of(AnnotatedType<T> annotatedType, ClassTransformer classTransformer)
{
AnnotationStore annotationStore = AnnotationStore.of(annotatedType.getAnnotations(), annotatedType.getAnnotations(), classTransformer.getTypeStore());
return new WBClassImpl<T>(annotatedType.getJavaClass(), annotatedType.getBaseType(), annotationStore, classTransformer);
}
Later on it seems to hit the class itself so that the annotations added for members via my MDR AnnotatedType decorator do not come into effect. The attached test.txt shows this behaviour in action.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 5 months