[
https://issues.apache.org/jira/browse/FELIX-2296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12862232#action_12862232
]
Clement Escoffier commented on FELIX-2296:
------------------------------------------
Hi,
It seems to work...
I did that:
{code:java}
// Service properties
private int intProp;
private String strProp;
private String[] strAProp;
private int[] intAProp;
private boolean boolProp;
public boolean foo() {
Runnable runnable = new Runnable() {
public void run() {
intProp = 3;
boolProp = true;
if(strProp.equals("foo")) { strProp = "bar"; }
else { strProp = "foo"; }
strAProp = new String[] {"foo", "bar", "baz"};
intAProp = new int[] {3, 2, 1};
}
};
new Thread(runnable).start();
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
return true;
}
{code}
The service properties are correctly updated inside the method. Could you give
me more details ? If you have a small bundle reproducing the issue, I would be
happy to check that.
> 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.