You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Thomas Diesler (JIRA)" <ji...@apache.org> on 2010/02/17 17:41:27 UTC

[jira] Created: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

JMX FrameworkMBean does not allow to resolve/refresh all bundles
----------------------------------------------------------------

                 Key: ARIES-177
                 URL: https://issues.apache.org/jira/browse/ARIES-177
             Project: Aries
          Issue Type: Bug
          Components: JMX
            Reporter: Thomas Diesler


The signature and API docs of 

FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
FrameworkMBean.resolveBundles(long[] bundleIdentifiers)

does not obviously allow to resolve/refresh all bundles.

A client would be forced to collect all ids before making the call. 
PackageAdmin however uses a null paramter to mean 'all bundles'.


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


[jira] Commented: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

Posted by "Thomas Diesler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839639#action_12839639 ] 

Thomas Diesler commented on ARIES-177:
--------------------------------------

There is a potential problem in Framework.resolveBundles(long[] bundleIdentifiers) when given partially invalid bundle ids

To be in sync with resolveBundle(long bundleIdentifier), we could change to

    public boolean resolveBundles(long[] bundleIdentifiers) throws IOException {
       Bundle[] bundles = null;
       if(bundleIdentifiers != null)
       {
          bundles = new Bundle[bundleIdentifiers.length];
          for (int i = 0; i < bundleIdentifiers.length; i++) 
          {
             bundles[i] = FrameworkUtils.resolveBundle(context, bundleIdentifiers[i]);
          }
       }
       return packageAdmin.resolveBundles(bundles);
    }

In the API docs he behaviour is unspecified. I raised the issue with the EEG

https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1606


> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>            Assignee: Adam Wojtuniak
>         Attachments: aries-177.patch
>
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Updated: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

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

Thomas Diesler updated ARIES-177:
---------------------------------

    Attachment: aries-177.patch

Replace 

    public void refreshPackages(long bundleIdentifier) throws IOException {
        Bundle bundle = FrameworkUtils.resolveBundle(context, bundleIdentifier);
        packageAdmin.refreshPackages(new Bundle[] { bundle });
    }

with 

    public void refreshBundle(long bundleIdentifier) throws IOException 
    {
        Bundle bundle = context.getBundle(bundleIdentifier);
        if (bundle == null)
           throw new IllegalArgumentException("Bundle does not exist: " + bundleIdentifier);
        
        packageAdmin.refreshPackages(new Bundle[] { bundle });
    }


> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>         Attachments: aries-177.patch
>
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Updated: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

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

Thomas Diesler updated ARIES-177:
---------------------------------

    Attachment: ARIES-177-20100312.patch

patch attached

> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>            Assignee: Adam Wojtuniak
>         Attachments: ARIES-177-20100312.patch, aries-177.patch
>
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Commented: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

Posted by "Thomas Diesler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834830#action_12834830 ] 

Thomas Diesler commented on ARIES-177:
--------------------------------------

  ------- Comment  #1 From hal.hildebrand@oracle.com  2010-02-17 11:03:44 UTC  [reply] -------

This has been fixed in the build.  Pass null for the array, which will indicate
all packages.

------- Comment #2 From tdiekman@tibco.com 2010-02-17 11:22:54 UTC [reply] -------

This needs to be changed in the JAVADOC of the trunk and added to an errata.



> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.

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


[jira] Updated: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

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

Thomas Diesler updated ARIES-177:
---------------------------------

    Description: 
The signature and API docs of 

FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
FrameworkMBean.resolveBundles(long[] bundleIdentifiers)

does not obviously allow to resolve/refresh all bundles.

A client would be forced to collect all ids before making the call. 
PackageAdmin however uses a null paramter to mean 'all bundles'.

https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

  was:
The signature and API docs of 

FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
FrameworkMBean.resolveBundles(long[] bundleIdentifiers)

does not obviously allow to resolve/refresh all bundles.

A client would be forced to collect all ids before making the call. 
PackageAdmin however uses a null paramter to mean 'all bundles'.



> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Updated: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

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

Thomas Diesler updated ARIES-177:
---------------------------------

    Attachment: aries-177.patch

patch attached

> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>         Attachments: aries-177.patch
>
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Commented: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

Posted by "Thomas Diesler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839634#action_12839634 ] 

Thomas Diesler commented on ARIES-177:
--------------------------------------

Of course. I was confused by the method name 'resolveBundle' without looking at the actual code. The method name suggests that the bundle gets resolved in the process, which I thougt was wrong at that point.

> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>            Assignee: Adam Wojtuniak
>         Attachments: aries-177.patch
>
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Resolved: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

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

Adam Wojtuniak resolved ARIES-177.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.1

> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>            Assignee: Adam Wojtuniak
>             Fix For: 0.1
>
>         Attachments: ARIES-177-20100312.patch, aries-177.patch
>
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Assigned: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

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

Adam Wojtuniak reassigned ARIES-177:
------------------------------------

    Assignee: Adam Wojtuniak

> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>            Assignee: Adam Wojtuniak
>         Attachments: aries-177.patch
>
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Updated: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

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

Thomas Diesler updated ARIES-177:
---------------------------------

    Attachment:     (was: aries-177.patch)

> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Commented: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

Posted by "Adam Wojtuniak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838865#action_12838865 ] 

Adam Wojtuniak commented on ARIES-177:
--------------------------------------

Thanks for the patch.
I will submit it later today.

Cheers,
Adam

> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>         Attachments: aries-177.patch
>
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Commented: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

Posted by "Adam Wojtuniak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839079#action_12839079 ] 

Adam Wojtuniak commented on ARIES-177:
--------------------------------------

Hi Thomas

I've already submitted previous version of the patch which has refreshBundle method like that:

public void refreshBundle(long bundleIdentifier) throws IOException {
        Bundle bundle = FrameworkUtils.resolveBundle(context, bundleIdentifier);
        packageAdmin.refreshPackages(new Bundle[] { bundle });
    }

I prefer this version of this method cause we are using FrameworkUtils to getting a bundle (we don't want to repeat the code).
Thanks for the patch.
Adam


> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>         Attachments: aries-177.patch
>
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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


[jira] Commented: (ARIES-177) JMX FrameworkMBean does not allow to resolve/refresh all bundles

Posted by "Adam Wojtuniak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845105#action_12845105 ] 

Adam Wojtuniak commented on ARIES-177:
--------------------------------------

Patch submitted plus couple lines refactored by me.
Thanks for the patch.
Adam

> JMX FrameworkMBean does not allow to resolve/refresh all bundles
> ----------------------------------------------------------------
>
>                 Key: ARIES-177
>                 URL: https://issues.apache.org/jira/browse/ARIES-177
>             Project: Aries
>          Issue Type: Bug
>          Components: JMX
>            Reporter: Thomas Diesler
>            Assignee: Adam Wojtuniak
>         Attachments: ARIES-177-20100312.patch, aries-177.patch
>
>
> The signature and API docs of 
> FrameworkMBean.refreshBundles(long[] bundleIdentifiers)
> FrameworkMBean.resolveBundles(long[] bundleIdentifiers)
> does not obviously allow to resolve/refresh all bundles.
> A client would be forced to collect all ids before making the call. 
> PackageAdmin however uses a null paramter to mean 'all bundles'.
> https://www.osgi.org/members/bugzilla/show_bug.cgi?id=1586

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