You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Bengt Rodehav (JIRA)" <ji...@apache.org> on 2010/10/04 21:47:32 UTC

[jira] Created: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Cannot control the validity of an iPOJO instance using a configuration property
-------------------------------------------------------------------------------

                 Key: FELIX-2636
                 URL: https://issues.apache.org/jira/browse/FELIX-2636
             Project: Felix
          Issue Type: Bug
          Components: iPOJO
    Affects Versions: iPOJO-1.4.0
            Reporter: Bengt Rodehav


Controlling the validity of an iPOJO instance as follows doesn't work:

@Controller
@Property(name = "connect.enabled", mandatory = true)
private boolean mValid = false;

When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.

On the other hand, if the following code is used...

@Controller
@Property(name = "connect.enabled", mandatory = true)
private boolean mValid = true;

...then the instance becomes valid even though the configuration property is false.

I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Posted by "Bengt Rodehav (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919058#action_12919058 ] 

Bengt Rodehav commented on FELIX-2636:
--------------------------------------

Great Clement!

I'll try the latest trunk tomorrow.

/Bengt

> Cannot control the validity of an iPOJO instance using a configuration property
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-2636
>                 URL: https://issues.apache.org/jira/browse/FELIX-2636
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>            Assignee: Clement Escoffier
>             Fix For: iPOJO-1.8.0
>
>
> Controlling the validity of an iPOJO instance as follows doesn't work:
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = false;
> When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.
> On the other hand, if the following code is used...
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = true;
> ...then the instance becomes valid even though the configuration property is false.
> I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919198#action_12919198 ] 

Clement Escoffier commented on FELIX-2636:
------------------------------------------

Hi,

1. No, you don't have to initialized the property because it may conflict with the property value.

2. I've no idea. Could you ask on the mailing list ?

3. ASAP :-) I want to fix FELIX-2594 (also impacting the core). But it should not be long so probably next week.



> Cannot control the validity of an iPOJO instance using a configuration property
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-2636
>                 URL: https://issues.apache.org/jira/browse/FELIX-2636
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>            Assignee: Clement Escoffier
>             Fix For: iPOJO-1.8.0
>
>
> Controlling the validity of an iPOJO instance as follows doesn't work:
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = false;
> When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.
> On the other hand, if the following code is used...
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = true;
> ...then the instance becomes valid even though the configuration property is false.
> I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Posted by "Bengt Rodehav (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919249#action_12919249 ] 

Bengt Rodehav commented on FELIX-2636:
--------------------------------------

Thanks a lot Clement.

Yes, you'r right, the FILE INSTALL vs BUNDLE CACHE question is better suited for the mailing list since it's not really connected to this issue (not connected to iPOJO at all probably).

Looking forward to the release.

> Cannot control the validity of an iPOJO instance using a configuration property
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-2636
>                 URL: https://issues.apache.org/jira/browse/FELIX-2636
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>            Assignee: Clement Escoffier
>             Fix For: iPOJO-1.8.0
>
>
> Controlling the validity of an iPOJO instance as follows doesn't work:
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = false;
> When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.
> On the other hand, if the following code is used...
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = true;
> ...then the instance becomes valid even though the configuration property is false.
> I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier updated FELIX-2636:
-------------------------------------

    Assignee: Clement Escoffier

> Cannot control the validity of an iPOJO instance using a configuration property
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-2636
>                 URL: https://issues.apache.org/jira/browse/FELIX-2636
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>            Assignee: Clement Escoffier
>             Fix For: iPOJO-1.8.0
>
>
> Controlling the validity of an iPOJO instance as follows doesn't work:
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = false;
> When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.
> On the other hand, if the following code is used...
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = true;
> ...then the instance becomes valid even though the configuration property is false.
> I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier closed FELIX-2636.
------------------------------------


> Cannot control the validity of an iPOJO instance using a configuration property
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-2636
>                 URL: https://issues.apache.org/jira/browse/FELIX-2636
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>            Assignee: Clement Escoffier
>             Fix For: iPOJO-1.8.0
>
>
> Controlling the validity of an iPOJO instance as follows doesn't work:
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = false;
> When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.
> On the other hand, if the following code is used...
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = true;
> ...then the instance becomes valid even though the configuration property is false.
> I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Posted by "Bengt Rodehav (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919186#action_12919186 ] 

Bengt Rodehav commented on FELIX-2636:
--------------------------------------

I've tried the latest trunk now. Seems to be 1.7.0-SNAPSHOT and not 1.8.0-SNAPSHOT which this JIRA indicates.

It works! Great job Clement. I still have a couple of questions though:

1. INITIALISATION

I presently use the following code:

@Controller
@Property(name = "connect.enabled", mandatory = true)
private boolean mValid = true;

Do I really have to initialise the mValid field? If yes, should I initialise it to true or false?

My reasoning is like this: Since this is a mandatory property, the instance will not be valid until it gets a value from configuration manager. Thus I shouldn't have to initialise it at all. Is this reasoning correct?

2. FILE INSTALL vs BUNDLE CACHE

I use file install to control my configuration. Thus I can change the configuration (the "connect.enabled" property) from either file install or directly in configuration manager (using the Webconsole or my own GUI). Which takes precedence on startup?

My tests indicate that what I specify in file install will be used even when configuration manager's cache differ from this value. Is this by accident or is this the way it will always work? I think I can live with either way as long as it's deterministic.

3. RELEASE

When do you think this fix will be available in an iPOJO release. I would like to get it into production as soon as possible since we've had incidents in production regarding this issue.



> Cannot control the validity of an iPOJO instance using a configuration property
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-2636
>                 URL: https://issues.apache.org/jira/browse/FELIX-2636
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>            Assignee: Clement Escoffier
>             Fix For: iPOJO-1.8.0
>
>
> Controlling the validity of an iPOJO instance as follows doesn't work:
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = false;
> When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.
> On the other hand, if the following code is used...
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = true;
> ...then the instance becomes valid even though the configuration property is false.
> I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier updated FELIX-2636:
-------------------------------------

    Fix Version/s: iPOJO-1.8.0

> Cannot control the validity of an iPOJO instance using a configuration property
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-2636
>                 URL: https://issues.apache.org/jira/browse/FELIX-2636
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>             Fix For: iPOJO-1.8.0
>
>
> Controlling the validity of an iPOJO instance as follows doesn't work:
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = false;
> When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.
> On the other hand, if the following code is used...
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = true;
> ...then the instance becomes valid even though the configuration property is false.
> I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928157#action_12928157 ] 

Clement Escoffier commented on FELIX-2636:
------------------------------------------

Released in iPOJO Core 1.6.6

> Cannot control the validity of an iPOJO instance using a configuration property
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-2636
>                 URL: https://issues.apache.org/jira/browse/FELIX-2636
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>            Assignee: Clement Escoffier
>             Fix For: iPOJO-1.8.0
>
>
> Controlling the validity of an iPOJO instance as follows doesn't work:
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = false;
> When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.
> On the other hand, if the following code is used...
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = true;
> ...then the instance becomes valid even though the configuration property is false.
> I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919005#action_12919005 ] 

Clement Escoffier commented on FELIX-2636:
------------------------------------------

I think, I've fixed the issue in the trunk.
The controller handler and the configuration handler are now interacting correctly.

> Cannot control the validity of an iPOJO instance using a configuration property
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-2636
>                 URL: https://issues.apache.org/jira/browse/FELIX-2636
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>            Assignee: Clement Escoffier
>             Fix For: iPOJO-1.8.0
>
>
> Controlling the validity of an iPOJO instance as follows doesn't work:
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = false;
> When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.
> On the other hand, if the following code is used...
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = true;
> ...then the instance becomes valid even though the configuration property is false.
> I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-2636) Cannot control the validity of an iPOJO instance using a configuration property

Posted by "Clement Escoffier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier resolved FELIX-2636.
--------------------------------------

    Resolution: Fixed

> Cannot control the validity of an iPOJO instance using a configuration property
> -------------------------------------------------------------------------------
>
>                 Key: FELIX-2636
>                 URL: https://issues.apache.org/jira/browse/FELIX-2636
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: iPOJO-1.4.0
>            Reporter: Bengt Rodehav
>            Assignee: Clement Escoffier
>             Fix For: iPOJO-1.8.0
>
>
> Controlling the validity of an iPOJO instance as follows doesn't work:
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = false;
> When initialising mValid to false (as above), the iPOJO instance becomes invalid even though the configuration property (connect.enabled in this case) is true.
> On the other hand, if the following code is used...
> @Controller
> @Property(name = "connect.enabled", mandatory = true)
> private boolean mValid = true;
> ...then the instance becomes valid even though the configuration property is false.
> I use Karaf 1.6.0 with file installer 3.0.2 in the scenario above. The problem only occurs when starting Karaf. Subsequent changes of the configuration property will change the validity of the instance correctly. The problem does not show when using iPOJO 1.6.0 but it's still important to make sure that the above described scenario is supported by iPOJO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.