[ 
https://issues.apache.org/jira/browse/ARIES-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Schneider updated ARIES-1306:
---------------------------------------
    Summary: Support @Produces annotation in blueprint-maven-plugin  (was: 
Support @Produces annotation for blueprint-maven-plugin)

> Support @Produces annotation in blueprint-maven-plugin
> ------------------------------------------------------
>
>                 Key: ARIES-1306
>                 URL: https://issues.apache.org/jira/browse/ARIES-1306
>             Project: Aries
>          Issue Type: Improvement
>          Components: Blueprint
>    Affects Versions: blueprint-maven-plugin-1.1.0
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: blueprint-maven-plugin-1.2.0
>
>
> In blueprint we can create beans using a factory-ref and factory-method.
> In JEE the same is done using the @Produces anntation on a factory.
> So we should support the @Produces annotation in the blueprint-maven-plugin 
> and translate it into the generation of two beans.
> The code below should result in the xml below:
> @Singleton
> public class MyFactoryBean {
>     @Produces
>     public MyProduced create() {
>         return new MyProduced("My message");
>     }
> }
> public class MyProduced {
>     private String message;
>     public MyProduced(String message) {
>         this.message = message;
>     }
>     
>     public String getMessage() {
>         return message;
>     }
> }
> <bean id="myFactoryBean" 
> class="org.apache.aries.blueprint.plugin.test.MyFactoryBean" 
> ext:field-injection="true">
> </bean>
> <bean id="myProduced" 
> class="org.apache.aries.blueprint.plugin.test.MyProduced" 
> ext:field-injection="true" factory-ref="myFactoryBean" 
> factory-method="create">
> </bean>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to