[weld-issues] [JBoss JIRA] Commented: (WELD-5) Java based DSL configuration of BeanDeploymentArchive

Gavin King (JIRA) jira-events at lists.jboss.org
Sun Oct 18 09:22:18 EDT 2009


    [ https://jira.jboss.org/jira/browse/WELD-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12490259#action_12490259 ] 

Gavin King commented on WELD-5:
-------------------------------

Folks, it is possible to build DSL-based configuration based upon the metamodel API. That way, the config API will work with *any* 299 implementation, and can be released as part of the extensions package:

http://seamframework.org/Weld/PortableExtensionsPackage

That's much better than having something that only works with the RI.

> Java based DSL configuration of BeanDeploymentArchive
> -----------------------------------------------------
>
>                 Key: WELD-5
>                 URL: https://jira.jboss.org/jira/browse/WELD-5
>             Project: Weld
>          Issue Type: Patch
>          Components: Bootstrap and Metamodel API
>            Reporter: Takeshi Kondo
>            Assignee: Takeshi Kondo
>            Priority: Minor
>             Fix For: 1.0.1.CR1
>
>         Attachments: dsl-configuration-impl-testcase.patch, dsl-configuration-impl.patch, dsl-configuration-interface.patch, dsl-configuration-test-case.patch, dsl-test.patch, 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

        


More information about the weld-issues mailing list