You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jeroen van Grondelle (JIRA)" <ji...@apache.org> on 2009/03/17 17:00:52 UTC
[jira] Created: (FELIX-987) Please make bundle context injection
optional
Please make bundle context injection optional
---------------------------------------------
Key: FELIX-987
URL: https://issues.apache.org/jira/browse/FELIX-987
Project: Felix
Issue Type: Improvement
Components: Dependency Manager
Reporter: Jeroen van Grondelle
Priority: Minor
We use the dependency manager to defer the registration of some services till required services are available
through binding an intermediary object to the dependency manager.
As we want to bind these services using a specific bundle context, we communicate this bundle context
through the intermediary.
Dependency manager's default behaviour is to inject the bundle context associated with the manager in any
member of type bundle context. Thus, our bundle context is overwritten and our services are bound to the
wrong bundle context.
Could bundle context injection be made optional through a parameter/setting?
Thanks in advance!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (FELIX-987) Please make bundle context injection
optional
Posted by "Marcel Offermans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcel Offermans closed FELIX-987.
----------------------------------
Closed the issue, assuming it's okay like this.
> Please make bundle context injection optional
> ---------------------------------------------
>
> Key: FELIX-987
> URL: https://issues.apache.org/jira/browse/FELIX-987
> Project: Felix
> Issue Type: Improvement
> Components: Dependency Manager
> Reporter: Jeroen van Grondelle
> Assignee: Marcel Offermans
> Priority: Minor
>
> We use the dependency manager to defer the registration of some services till required services are available
> through binding an intermediary object to the dependency manager.
> As we want to bind these services using a specific bundle context, we communicate this bundle context
> through the intermediary.
> Dependency manager's default behaviour is to inject the bundle context associated with the manager in any
> member of type bundle context. Thus, our bundle context is overwritten and our services are bound to the
> wrong bundle context.
> Could bundle context injection be made optional through a parameter/setting?
> Thanks in advance!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (FELIX-987) Please make bundle context injection
optional
Posted by "Marcel Offermans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcel Offermans reassigned FELIX-987:
--------------------------------------
Assignee: Marcel Offermans
> Please make bundle context injection optional
> ---------------------------------------------
>
> Key: FELIX-987
> URL: https://issues.apache.org/jira/browse/FELIX-987
> Project: Felix
> Issue Type: Improvement
> Components: Dependency Manager
> Reporter: Jeroen van Grondelle
> Assignee: Marcel Offermans
> Priority: Minor
>
> We use the dependency manager to defer the registration of some services till required services are available
> through binding an intermediary object to the dependency manager.
> As we want to bind these services using a specific bundle context, we communicate this bundle context
> through the intermediary.
> Dependency manager's default behaviour is to inject the bundle context associated with the manager in any
> member of type bundle context. Thus, our bundle context is overwritten and our services are bound to the
> wrong bundle context.
> Could bundle context injection be made optional through a parameter/setting?
> Thanks in advance!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (FELIX-987) Please make bundle context injection
optional
Posted by "Marcel Offermans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcel Offermans resolved FELIX-987.
------------------------------------
Resolution: Fixed
Committed an implementation.
> Please make bundle context injection optional
> ---------------------------------------------
>
> Key: FELIX-987
> URL: https://issues.apache.org/jira/browse/FELIX-987
> Project: Felix
> Issue Type: Improvement
> Components: Dependency Manager
> Reporter: Jeroen van Grondelle
> Assignee: Marcel Offermans
> Priority: Minor
>
> We use the dependency manager to defer the registration of some services till required services are available
> through binding an intermediary object to the dependency manager.
> As we want to bind these services using a specific bundle context, we communicate this bundle context
> through the intermediary.
> Dependency manager's default behaviour is to inject the bundle context associated with the manager in any
> member of type bundle context. Thus, our bundle context is overwritten and our services are bound to the
> wrong bundle context.
> Could bundle context injection be made optional through a parameter/setting?
> Thanks in advance!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (FELIX-987) Please make bundle context injection
optional
Posted by "Marcel Offermans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682813#action_12682813 ]
Marcel Offermans commented on FELIX-987:
----------------------------------------
There are currently three things besides dependencies that are automatically injected: BundleContext, ServiceRegistration and DependencyManager.
For service dependencies, you can now configure two things:
1) if you want them to be injected at all (setAutoConfig(boolean))
2) which specific field name you want to use (default is all fields of that type) (setAutoConfig(String))
Probably, you want to be able to do something similar for these things, defaulting to the same behaviour as before if you don't configure anything. I'm thinking about adding the following method to the ServiceImpl:
- setAutoConfig(Clazz type, boolean autoConfig) allowing you to do: setAutoConfig(BundleContext.class, false)
- setAutoConfig(Clazz type, String instanceName) to only use a specific instance name for injection
Does that make sense?
> Please make bundle context injection optional
> ---------------------------------------------
>
> Key: FELIX-987
> URL: https://issues.apache.org/jira/browse/FELIX-987
> Project: Felix
> Issue Type: Improvement
> Components: Dependency Manager
> Reporter: Jeroen van Grondelle
> Assignee: Marcel Offermans
> Priority: Minor
>
> We use the dependency manager to defer the registration of some services till required services are available
> through binding an intermediary object to the dependency manager.
> As we want to bind these services using a specific bundle context, we communicate this bundle context
> through the intermediary.
> Dependency manager's default behaviour is to inject the bundle context associated with the manager in any
> member of type bundle context. Thus, our bundle context is overwritten and our services are bound to the
> wrong bundle context.
> Could bundle context injection be made optional through a parameter/setting?
> Thanks in advance!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Work started: (FELIX-987) Please make bundle context
injection optional
Posted by "Marcel Offermans (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on FELIX-987 started by Marcel Offermans.
> Please make bundle context injection optional
> ---------------------------------------------
>
> Key: FELIX-987
> URL: https://issues.apache.org/jira/browse/FELIX-987
> Project: Felix
> Issue Type: Improvement
> Components: Dependency Manager
> Reporter: Jeroen van Grondelle
> Assignee: Marcel Offermans
> Priority: Minor
>
> We use the dependency manager to defer the registration of some services till required services are available
> through binding an intermediary object to the dependency manager.
> As we want to bind these services using a specific bundle context, we communicate this bundle context
> through the intermediary.
> Dependency manager's default behaviour is to inject the bundle context associated with the manager in any
> member of type bundle context. Thus, our bundle context is overwritten and our services are bound to the
> wrong bundle context.
> Could bundle context injection be made optional through a parameter/setting?
> Thanks in advance!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.