[
https://issues.apache.org/jira/browse/FELIX-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789870#action_12789870
]
Clement Escoffier commented on FELIX-1940:
------------------------------------------
Hello,
I agree with Rick, that's why it's not provided. However, I started thinking to
that issue, and can propose something like:
@ApplicationConfig(composite=false, instances= {
@Instance(component="My-Component-Type"),
@Instance(component="My-Second-Type",
configuration= @InstanceProperty(name="myprop", value="myvalue")),
@Instance(component="My-Third-Type",
configuration= {
@InstanceProperty(name="service.pid", value="my-pid"),
@InstanceProperty(name="values", values= {"a", "b", "c"}),
@InstanceProperty(name="others", values= {"a", "b", "c"},
type=List.class)
}
)
})
public class Dummy { }
Instead of declaring @Instance directly, you describe your application
configuration. As shown by the previous code snippet, it will allows you to
declare your instance (set), and also configure the instances. It's not
completely done yet, because I would like to be able to configure dictionaries
and maps too which is more tricky :-).
Does this fulfill your requirements ?
Thanks and Regards,
Clement
> Add @Instance annotation to declare instances without metadata.xml
> ------------------------------------------------------------------
>
> Key: FELIX-1940
> URL: https://issues.apache.org/jira/browse/FELIX-1940
> Project: Felix
> Issue Type: Wish
> Components: iPOJO
> Affects Versions: iPOJO-1.4.0
> Reporter: Allen Hackley
> Priority: Minor
>
> Currently, instances cannot be declared using annotations.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.