You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2009/01/18 12:52:59 UTC

[jira] Created: (FELIX-884) OBR should expose registered services as capabilities of local repository

OBR should expose registered services as capabilities of local repository
-------------------------------------------------------------------------

                 Key: FELIX-884
                 URL: https://issues.apache.org/jira/browse/FELIX-884
             Project: Felix
          Issue Type: Improvement
          Components: Bundle Repository (OBR)
    Affects Versions: bundlerepository-1.2.0
            Reporter: Felix Meschberger


The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.

So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.

I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.

WDYT ?

Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Updated: (FELIX-884) OBR should expose registered services as capabilities of local repository

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

Felix Meschberger updated FELIX-884:
------------------------------------

    Affects Version/s:     (was: bundlerepository-1.2.0)
                       bundlerepository-1.2.1
        Fix Version/s: bundlerepository-1.3.0

Fix versions

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.1
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: bundlerepository-1.3.0
>
>         Attachments: FELIX-884-2.patch, FELIX-884-3.patch, FELIX-884-4.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Updated: (FELIX-884) OBR should expose registered services as capabilities of local repository

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

Felix Meschberger updated FELIX-884:
------------------------------------

    Attachment: FELIX-884.patch

Proposed patch implementing the addition of capabilities for registered service (names) to the system bundle.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Issue Comment Edited: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665545#action_12665545 ] 

fmeschbe edited comment on FELIX-884 at 1/20/09 12:27 PM:
-------------------------------------------------------------------

Final patch incorporating Richard's recommendations.

      was (Author: fmeschbe):
    Final patch incoroporating Richards recommendations.
  
> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884-3.patch, FELIX-884-4.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665543#action_12665543 ] 

Felix Meschberger commented on FELIX-884:
-----------------------------------------

> Make RepositoryAdminImpl.m_local, ResolverImpl.m_context, ResolverImpl.m_admin, and LocalRepositoryImpl.m_context final

Sure, done.

> Make LocalRepositoryImpl.bundleChanged(), LocalRepositoryImpl.serviceChanged(), and LocalRepositoryImpl.initialize() 

For bundleChanged and serviceChanged I synchronized the blocks actually changing state, such that synchronization is only done if the event type causes internal state change. In the initialize() method I synchronized on the call to BundleContext.getBundles() plus the internal addition of the bundles plus the assignement of the snapshot timestamp.

In addition I added comments to addBundle and removeBundle, that they must be called synchronized on the instance.

> Fix formatting

Done, escaped my format control

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884-3.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Issue Comment Edited: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665225#action_12665225 ] 

rickhall edited comment on FELIX-884 at 1/19/09 12:56 PM:
-----------------------------------------------------------------

Should we be creating the union of Export-Service and getRegisteredServices() for the service capabilities of the bundle? I think it currently would create duplicates, no?

Also, what is the relationship between this patch and FELIX-887? Is there a dependency such that one needs to be applied before the other? It seems like they are conflicting.

      was (Author: rickhall):
    Should we be creating the union of Export-Service and getRegisteredServices() for the service capabilities of the bundle? I think it currently would create duplicates, no?

Also, what is the relationship between this patch and 887? Is there a dependency such that one needs to be applied before the other? It seems like they are conflicting.
  
> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665557#action_12665557 ] 

Richard S. Hall commented on FELIX-884:
---------------------------------------

The comments in addBundle() and removeBundle() are good to have as reminders. There are some new formatting errors in the event callback methods, but otherwise it looks good. Thanks.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884-3.patch, FELIX-884-4.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664995#action_12664995 ] 

Richard S. Hall commented on FELIX-884:
---------------------------------------

Ok, I forgot I implemented that way, I just assumed we would cache it, but I see in my comments that caching is a "to do". Given that it is not long lived, I agree it is probably ok as is or possibly better with a service listener to invalidate the service state.

The local repo is disposed every time Resolver.resolve() is called, so it does probably make more sense for us to dispose it at the end of the resolve() method.

Is there any value in adding the service capabilities directly to the appropriate bundle using getRegisteredServices() as we process the bundles?

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664991#action_12664991 ] 

Felix Meschberger commented on FELIX-884:
-----------------------------------------

I don't think that it is required currently to track services, since the LocalRepositoryImpl and hence the LocalResourceInstances only live for the duration of the Resolver.resolve() and subsequent Resolver.deploy() call. In particular the deploy() method fails if a bundle changes state between the resolve() and the deploy() method call.

What we might do is add a service listener which invalidates the LocalRepositoryImpl in the same way as a bundle change invalidates it. But I am not sure, whether we should really react to service changes.

If that changes, listening for service changes might make sense.

(this is highlights another potential issue: The LocalRepositoryImpl constructor causes a SynchronizedBundleListener to be registered, which is only unregistered when the LocaleRepositoryImpl.dispose() method is called or when the OBR bundle is stopped. Maybe the deploy() method should dispose the LocalRepositoryImpl when finishing. But this is a side-track).

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665048#action_12665048 ] 

Felix Meschberger commented on FELIX-884:
-----------------------------------------

> Given that it is not long lived, I agree it is probably ok as is or possibly better with a service listener to invalidate the service state.

Agreed, I adapt the patch.

> so it does probably make more sense for us to dispose it at the end of the resolve() method. 

This would be simple, yes, but it would prevent the deploy() method from recognizing that there were changes to bundles between caling the resolve() method and calling the deploy() method.

How about adding the BundleListener and ServiceListener to the RepositoryAdminImpl and provide a getLastChange() call to the RepositoryAdminImpl. The ResolverImpl couild call that when starting resove() and could verify the getLastChanged() did not change when the deploy method is called ?

I created FELIX-887 to follow up on this issue

> Is there any value in adding the service capabilities directly to the appropriate bundle using getRegisteredServices()
> as we process the bundles?

This would be cleaner, yes. I will adapt the patch.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Resolved: (FELIX-884) OBR should expose registered services as capabilities of local repository

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

Felix Meschberger resolved FELIX-884.
-------------------------------------

    Resolution: Fixed
      Assignee: Felix Meschberger

Resolving this issue for now waiting for feedback from the intiial reporting user.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884-3.patch, FELIX-884-4.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Updated: (FELIX-884) OBR should expose registered services as capabilities of local repository

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

Felix Meschberger updated FELIX-884:
------------------------------------

    Attachment: FELIX-884-3.patch

Combined patch of the previous second patch with the previous patch of FELIX-887

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884-3.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Updated: (FELIX-884) OBR should expose registered services as capabilities of local repository

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

Felix Meschberger updated FELIX-884:
------------------------------------

    Attachment: FELIX-884-4.patch

Final patch incoroporating Richards recommendations.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884-3.patch, FELIX-884-4.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Updated: (FELIX-884) OBR should expose registered services as capabilities of local repository

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

Felix Meschberger updated FELIX-884:
------------------------------------

    Attachment: FELIX-884-2.patch

Modified patch, which registers a service listener to update the system state timestamp and registers the
registered services with their registering bundles instead of with the system bundle.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665225#action_12665225 ] 

Richard S. Hall commented on FELIX-884:
---------------------------------------

Should we be creating the union of Export-Service and getRegisteredServices() for the service capabilities of the bundle? I think it currently would create duplicates, no?

Also, what is the relationship between this patch and 887? Is there a dependency such that one needs to be applied before the other? It seems like they are conflicting.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666084#action_12666084 ] 

Felix Meschberger commented on FELIX-884:
-----------------------------------------

Applied the last patch FELIX-884-4.patch with two modifications in Rev. 736585 :

(1) The LocalRepositoryImpl should pick up bundles as they are installed and drop them as they are uninstalled. Otherwise an inactive bundle may not be recognized and contribute to requirement resolution and cause installation failure since the bundle would be installed again.

(2) Formatting fixes to the added synchronized blocks.

I deployed SNAPSHOT version 1.3.0-20090122.082408-2 containing these fixes.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884-3.patch, FELIX-884-4.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664974#action_12664974 ] 

Richard S. Hall commented on FELIX-884:
---------------------------------------

Interesting. Makes sense. Is this patch too simplistic? Do we need something that it slightly more dynamic (i.e., tracking when services appear or disappear)?

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665571#action_12665571 ] 

Felix Meschberger commented on FELIX-884:
-----------------------------------------

Ok, thanks.

Re formatting: These must have creaped in while adding the synchronized stuff. Will fix before committing.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884-3.patch, FELIX-884-4.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665359#action_12665359 ] 

Felix Meschberger commented on FELIX-884:
-----------------------------------------

> Should we be creating the union of Export-Service and getRegisteredServices()

Probably yes.

> Relation to FELIX-887

The patches are independent applicable to trunk. And since the actual patch is adding to LocalRepositoryImpl and the FELIX-887 is changing how LocalRepositoryImpl is used, there is a small conflict. I think for the independent discussion of each patch, this is not a big issue. For the application of the patches, I would assume to first apply the (final) patch for this issue and then apply the patch for FELIX-887.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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


[jira] Commented: (FELIX-884) OBR should expose registered services as capabilities of local repository

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665510#action_12665510 ] 

Richard S. Hall commented on FELIX-884:
---------------------------------------

I think the combined patch looks pretty good. I have the following suggestions (some of which are a result of the patch and other which are pre-existing but related to the patch):

Make RepositoryAdminImpl.m_local, ResolverImpl.m_context, ResolverImpl.m_admin, and LocalRepositoryImpl.m_context final so we don't have to worry about concurrent visibility.

Make LocalRepositoryImpl.bundleChanged(), LocalRepositoryImpl.serviceChanged(), and LocalRepositoryImpl.initialize() (or LocalRepositoryImpl.addBundle()) synchronized since they are accessing shared state.

Fix formating of LocalRepositoryImpl.removeBundle() method.

There are actually some other changes I will look into too, but these seem to be the most relevant to the proposed patch. If you agree, then I think the patch is ready with these changes. If not, then let's discuss it.

> OBR should expose registered services as capabilities of local repository
> -------------------------------------------------------------------------
>
>                 Key: FELIX-884
>                 URL: https://issues.apache.org/jira/browse/FELIX-884
>             Project: Felix
>          Issue Type: Improvement
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>            Reporter: Felix Meschberger
>         Attachments: FELIX-884-2.patch, FELIX-884-3.patch, FELIX-884.patch
>
>
> The OBR implementation exposes the current state of the framework as a Repository, the LocalRepository. This provides the installed bundles as parts provided by a repository with their capabilities. These capabilities do not currently only reflect the currently installed set of bundles and their static setup such as package import/export and service import/export. The actually registered services, though are not exposed as capabilities whatsoever.
> So if for example, the OPS4J Pax Web Service bundle registers an HttpService instance. But this fact is not reflected by a ExportService header. Trying to install a bundle from the OBR which requires an HttpService fails, since the actually registered HttpService is not provided as a capability.
> I suggest, the LocalRepository exposes all registered services (just their names would probably do it) as capabilities of the system bundle. This is not entirely correct but should probably be enough to satisfy the requirements of bundles.
> WDYT ?
> Ref: Discussion on user list at http://markmail.org/message/ivkdvhpk4gclkylv

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