You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Ivan (JIRA)" <ji...@apache.org> on 2009/10/22 04:27:59 UTC

[jira] Created: (GERONIMO-4921) Use OSGI's way to manage the server repository

Use OSGI's way to manage the server repository
----------------------------------------------

                 Key: GERONIMO-4921
                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
             Project: Geronimo
          Issue Type: Improvement
      Security Level: public (Regular issues)
          Components: osgi
    Affects Versions: 3.0
            Reporter: Ivan
             Fix For: 3.0


Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Commented: (GERONIMO-4921) Use OSGI's way to manage the server repository

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770298#action_12770298 ] 

David Jencks commented on GERONIMO-4921:
----------------------------------------

I'm confused.  After seeing thousands of these exceptions, I got rid of them by always using the mvn urls and checking the locations of each installed bundle for duplicates before trying to install.  As a result of this experience I think it is essential that we only use mvn urls for all bundles we install into osgi.  Do you see problems if you use mvn urls everywhere?

> Use OSGI's way to manage the server repository
> ----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Commented: (GERONIMO-4921) Use OSGI's way to manage the server repository

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768691#action_12768691 ] 

Ivan commented on GERONIMO-4921:
--------------------------------

While playing with the geronimo-framework,  I found that by default, felix will cache the bundles in the cache folder, and just replace the files in the repository will not affect those ones in the cache folder, so even after restarting the server, those files in the cache are not refreshed.
1. We should call the OSGI api to install/refresh files in the cache while we deploy/redeploy Java EE applications in the future.
2. With the cache working, it seems that if the repository occupies 50 M, we will need another 50M disk space as the cache, not sure whether it is acceptable.
Thanks for any comment !

> Use OSGI's way to manage the server repository
> ----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Commented: (GERONIMO-4921) Use OSGI's way to manage the server repository

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770368#action_12770368 ] 

Ivan commented on GERONIMO-4921:
--------------------------------

I agree that use a unique url style is better, and mvn url is truely a good choice, but the question is that Felix has different strategy depending on the url styles. Internally, it supports three url styles : reference:file, file, inputstream, it only uses the file link (not copy bundles to the cache folder) while the location is of reference:file style.  Currently, when Geronimo is started, the mvn url is used, then Felix will copy the bundle from inputstream to its cache folder. So far, I did not see a way to make both mvn url and reference file active.

We may have a better way to check whether the bundle is installed, since we only use mvn style url now, we could directly call the install the bundle and depending on the state of the returned bundle object, we could decide whether or not need to call the start action.

If we use different url style to disable the cache function in the future, we may need other ways to find whether corresponding bundle is installed or not, to keep a installed artifact list is one of the choices. Another side, we may need a flag in the META-INF of the bundles to decide which style will be used (Copy Or Not Copy). From some discussion of Felix forum, while using the file reference style, there will be some problems about loading native libraries. 

Any comment ?

> Use OSGI's way to manage the server repository
> ----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Commented: (GERONIMO-4921) Figure out how to handle OSGI cache in Geronimo

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772324#action_12772324 ] 

Ivan commented on GERONIMO-4921:
--------------------------------

I asked it in Felix forum, seems that while mvn style protocol is used, Felix will read the bundle from the stream, then save it in the cache. 
http://old.nabble.com/Change-the-behavior-of-the-bundle-installation-with-mvn-url-protocol-td26108064.html
So it seems that if we need to enable the file reference in OSGI to avoid file copying, the only way I could see is to use reference:file url for bundle installation. But if we do that, we can not use location to identify the bundle, for two urls may point to the same bundle.

> Figure out how to handle OSGI cache in Geronimo
> -----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Commented: (GERONIMO-4921) Use OSGI's way to manage the server repository

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768769#action_12768769 ] 

David Jencks commented on GERONIMO-4921:
----------------------------------------

I thought I had managed to configure the pax maven url handler to use bundle references rather than copying the bundle into data.  If I failed, hopefully it will be easy to fix.

I don't think that osgi should install everything in the repository.  This would make the client container unmanageable for instance.  osgi install bundle is not AFAICT equivalent to any existing geronimo lifecycle phase.  To me it seems like a new stage before starting the configuration gbean.  In any case, osgi install should only happen when we are trying to start a particular geronimo plugin.

> Use OSGI's way to manage the server repository
> ----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Updated: (GERONIMO-4921) Figure out how to handle OSGI cache in Geronimo

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

Rick McGuire updated GERONIMO-4921:
-----------------------------------

    Issue Type: Sub-task  (was: Improvement)
        Parent: GERONIMO-5087

> Figure out how to handle OSGI cache in Geronimo
> -----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Sub-task
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Updated: (GERONIMO-4921) Figure out how to handle OSGI cache in Geronimo

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

Ivan updated GERONIMO-4921:
---------------------------

    Summary: Figure out how to handle OSGI cache in Geronimo  (was: Use OSGI's way to manage the server repository)

Change the JIRA name to reflect the actual thread that JIRA is talked about.

> Figure out how to handle OSGI cache in Geronimo
> -----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Commented: (GERONIMO-4921) Use OSGI's way to manage the server repository

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769922#action_12769922 ] 

Ivan commented on GERONIMO-4921:
--------------------------------

Commit the first step change to use file reference for the bundle installation.  Some changes may need to determine whether the bundle is loaded.

> Use OSGI's way to manage the server repository
> ----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Commented: (GERONIMO-4921) Use OSGI's way to manage the server repository

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770692#action_12770692 ] 

David Jencks commented on GERONIMO-4921:
----------------------------------------

I think we need to modify the pax-mvn-url code to send reference urls to felix (or whatever else is needed).

For native libraries, there must be a better solution than copying the whole bundle.  I'm just not worried about this yet.

> Use OSGI's way to manage the server repository
> ----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Commented: (GERONIMO-4921) Use OSGI's way to manage the server repository

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769101#action_12769101 ] 

Ivan commented on GERONIMO-4921:
--------------------------------

If you mean the " use bundle reference"  is something like "file link", I did not think it works now. In the cache folder, I could see all the installed bundles that running in the OSGI. Actually, it is managed by Felix IIRC, and the repository folder is managed by Karaf. Will have a close look at it later.

> Use OSGI's way to manage the server repository
> ----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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


[jira] Commented: (GERONIMO-4921) Use OSGI's way to manage the server repository

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-4921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769929#action_12769929 ] 

Ivan commented on GERONIMO-4921:
--------------------------------

After enabling the file reference configuration, I got many Bundle symbolic name and version are not unique Exception.
For in the startup.properties, mvn url is used for the bundle installation, so just by comparing the getLocation() is not enough here.  
Since in Geronimo, all the bundles are mananged in mvn style, I think we could use artifact to do the comparation by parsing the mvn url location.
Any comment ?

> Use OSGI's way to manage the server repository
> ----------------------------------------------
>
>                 Key: GERONIMO-4921
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4921
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: osgi
>    Affects Versions: 3.0
>            Reporter: Ivan
>             Fix For: 3.0
>
>
> Some install/uninstall action should be done via OSGI API  or Karaf functions more easily.

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