You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Peter Rietzler (JIRA)" <ji...@apache.org> on 2009/12/16 08:12:18 UTC

[jira] Created: (TAP5-955) Optional service contributions

Optional service contributions
------------------------------

                 Key: TAP5-955
                 URL: https://issues.apache.org/jira/browse/TAP5-955
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-ioc
            Reporter: Peter Rietzler


Currently the registry wil not start if a module makes contributions to a service which does not exist (e.g. because the module with the service is not loaded). This makes problems with applications, that allow installations with a subset of all modules started. A module should be able to contribute to an extension point only if it is available. In case the service does not exist, the contribution should be ignored. 

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


[jira] Commented: (TAP5-955) Optional service contributions

Posted by "Peter Niederwieser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791580#action_12791580 ] 

Peter Niederwieser commented on TAP5-955:
-----------------------------------------

Requiring that every contribution has a "target" takes away a lot of flexibility from the module system. None of the other module systems I know (Eclipse, OSGi) enforces such a constraint. At the very least, there should be an option to turn this feature off. Personally I consider it a misfeature that, although it might look attractive at first, brings more harm then benefit - especially for large apps. And large apps are where module systems are supposed to shine the most.

It's perfectly sensible to only start the modules that are needed in the current situation (in particular but not only for testing), and Tapestry should not work against this. Otherwise modules will get deployed and started just to make Tapestry happy. I've seen this more than once in practice.

> Optional service contributions
> ------------------------------
>
>                 Key: TAP5-955
>                 URL: https://issues.apache.org/jira/browse/TAP5-955
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-ioc
>            Reporter: Peter Rietzler
>
> Currently the registry wil not start if a module makes contributions to a service which does not exist (e.g. because the module with the service is not loaded). This makes problems with applications, that allow installations with a subset of all modules started. A module should be able to contribute to an extension point only if it is available. In case the service does not exist, the contribution should be ignored. 

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


[jira] Commented: (TAP5-955) Optional service contributions

Posted by "Peter Niederwieser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791580#action_12791580 ] 

Peter Niederwieser commented on TAP5-955:
-----------------------------------------

Requiring that every contribution has a "target" takes away a lot of flexibility from the module system. None of the other module systems I know (Eclipse, OSGi) enforces such a constraint. At the very least, there should be an option to turn this feature off. Personally I consider it a misfeature that, although it might look attractive at first, brings more harm then benefit - especially for large apps. And large apps are where module systems are supposed to shine the most.

It's perfectly sensible to only start the modules that are needed in the current situation (in particular but not only for testing), and Tapestry should not work against this. Otherwise modules will get deployed and started just to make Tapestry happy. I've seen this more than once in practice.

> Optional service contributions
> ------------------------------
>
>                 Key: TAP5-955
>                 URL: https://issues.apache.org/jira/browse/TAP5-955
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-ioc
>            Reporter: Peter Rietzler
>
> Currently the registry wil not start if a module makes contributions to a service which does not exist (e.g. because the module with the service is not loaded). This makes problems with applications, that allow installations with a subset of all modules started. A module should be able to contribute to an extension point only if it is available. In case the service does not exist, the contribution should be ignored. 

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


[jira] Commented: (TAP5-955) Optional service contributions

Posted by "Massimo Lusetti (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791276#action_12791276 ] 

Massimo Lusetti commented on TAP5-955:
--------------------------------------

Actually the current behavior is preferred in most situations. This could be a knob instead.

> Optional service contributions
> ------------------------------
>
>                 Key: TAP5-955
>                 URL: https://issues.apache.org/jira/browse/TAP5-955
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-ioc
>            Reporter: Peter Rietzler
>
> Currently the registry wil not start if a module makes contributions to a service which does not exist (e.g. because the module with the service is not loaded). This makes problems with applications, that allow installations with a subset of all modules started. A module should be able to contribute to an extension point only if it is available. In case the service does not exist, the contribution should be ignored. 

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


[jira] Commented: (TAP5-955) Optional service contributions

Posted by "Peter Rietzler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791287#action_12791287 ] 

Peter Rietzler commented on TAP5-955:
-------------------------------------

I absolutely agree with you. The standard behavior should not change - I thought of something like this: 

@Contribute(to = "service-name", optional = true)
public static void arbitraryContributeMethodName(....) 

or 

@Optional
public static void contributeServiceName(...)

> Optional service contributions
> ------------------------------
>
>                 Key: TAP5-955
>                 URL: https://issues.apache.org/jira/browse/TAP5-955
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-ioc
>            Reporter: Peter Rietzler
>
> Currently the registry wil not start if a module makes contributions to a service which does not exist (e.g. because the module with the service is not loaded). This makes problems with applications, that allow installations with a subset of all modules started. A module should be able to contribute to an extension point only if it is available. In case the service does not exist, the contribution should be ignored. 

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


[jira] Commented: (TAP5-955) Optional service contributions

Posted by "Peter Rietzler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791287#action_12791287 ] 

Peter Rietzler commented on TAP5-955:
-------------------------------------

I absolutely agree with you. The standard behavior should not change - I thought of something like this: 

@Contribute(to = "service-name", optional = true)
public static void arbitraryContributeMethodName(....) 

or 

@Optional
public static void contributeServiceName(...)

> Optional service contributions
> ------------------------------
>
>                 Key: TAP5-955
>                 URL: https://issues.apache.org/jira/browse/TAP5-955
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-ioc
>            Reporter: Peter Rietzler
>
> Currently the registry wil not start if a module makes contributions to a service which does not exist (e.g. because the module with the service is not loaded). This makes problems with applications, that allow installations with a subset of all modules started. A module should be able to contribute to an extension point only if it is available. In case the service does not exist, the contribution should be ignored. 

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


[jira] Commented: (TAP5-955) Optional service contributions

Posted by "Massimo Lusetti (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791276#action_12791276 ] 

Massimo Lusetti commented on TAP5-955:
--------------------------------------

Actually the current behavior is preferred in most situations. This could be a knob instead.

> Optional service contributions
> ------------------------------
>
>                 Key: TAP5-955
>                 URL: https://issues.apache.org/jira/browse/TAP5-955
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-ioc
>            Reporter: Peter Rietzler
>
> Currently the registry wil not start if a module makes contributions to a service which does not exist (e.g. because the module with the service is not loaded). This makes problems with applications, that allow installations with a subset of all modules started. A module should be able to contribute to an extension point only if it is available. In case the service does not exist, the contribution should be ignored. 

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