[
https://issues.apache.org/jira/browse/FELIX-2296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862253#action_12862253
]
Brian Tribondeau commented on FELIX-2296:
-----------------------------------------
Hello
I am currently on vacation. I will post the code in two weeks.
Fyi, I used ipojo 1.4, annotations only (@ServiceProperty & @Requires with
filter) except for instance creation, and the OSGi runtime is Equinox.
The problem is using the filter property of @Requires in two separate bundles.
The instance using the filter is not created.
Bundle A :
@ServiceProperty(value = "false")
private boolean ready;
...
SwingUtilities.invokeLater(new Runnable() {
public void run() {
ready = true;
}});
Bundle B :
@Require(filter = "(ready=true))
BundleConstructor() {
sysout("You will not see me")
}
By the way, there is no Runnable variable created, the anonymous function is
invoked immediately.
> iPojo : Unable to get a ServiceProperty change in an anonymous class
> --------------------------------------------------------------------
>
> Key: FELIX-2296
> URL: https://issues.apache.org/jira/browse/FELIX-2296
> Project: Felix
> Issue Type: Bug
> Components: iPOJO
> Affects Versions: iPOJO-1.4.0, iPOJO-1.6.0
> Reporter: Brian Tribondeau
> Assignee: Clement Escoffier
> Priority: Critical
> Fix For: iPOJO-1.8.0
>
>
> @ServiceProperty(value = "false")
> private boolean ready;
> ...
> SwingUtilities.invokeLater(new Runnable() {
> public void run() {
> ready = true;
> }});
> is not equivalent to :
> SwingUtilities.invokeLater(new Runnable() {
> public void run() {
> connect();
> }});
> public void connect() {
> ready = true;
> }
> (I use a @Require(filter = "(ready=true)) to start an another service
> instance)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.