[jira] Created: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
----------------------------------------------------------------------------------------------------

                 Key: CAMEL-1043
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 1.5.0
            Reporter: Claus Ibsen
             Fix For: 2.0.0


ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.

Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.

This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gert Vanthienen reassigned CAMEL-1043:
--------------------------------------

    Assignee: Gert Vanthienen

I'll give it a try myself, if that's OK with you guys...

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Gert Vanthienen
>             Fix For: 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46955#action_46955 ]

Gert Vanthienen commented on CAMEL-1043:
----------------------------------------

I rather think we should try to leverage the OSGi registry more when using Camel on an OSGi platform.  If we enhance our bundles and add a bundle activator to register their own converters and components, we can avoid having to scan across bundles and running into this kind of OSGi platform incompatibilities.

Using this approach, we would also have a foundation for starting to react more dynamically when bundles are added and removed from the platform.  We could e.g. start/stop routes as bundles with components are started/stopped or (in the future) add some kind of interceptor that can be started/stopped from a bundle.


> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>             Fix For: 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46966#action_46966 ]

Claus Ibsen commented on CAMEL-1043:
------------------------------------

Fantastic Gert. Please give a go.

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Gert Vanthienen
>             Fix For: 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-1043:
-----------------------------------

    Assignee: Willem Jiang  (was: Gert Vanthienen)

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang updated CAMEL-1043:
--------------------------------

    Fix Version/s: 1.5.1

Now there is an Activator which takes care of the searching the META-INFO of the camel components bundles for components and type converters.

TODO  we need to refactor the ResolverUtil to pull the osgi relating codes into camel-osgi module.

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48422#action_48422 ]

njiang edited comment on CAMEL-1043 at 1/3/09 11:25 PM:
--------------------------------------------------------------

Now there is an Activator in Camel-osig which takes care of the searching the META-INFO of the camel components bundles for components , type converters and language.
In this way , other components will not do any additional work to be osgi friendly, and the ResolverUtil's will not need to check the classloader for loading the bundles.

TODO  we need to refactor the ResolverUtil to pull the osgi relating codes into camel-osgi module.

      was (Author: njiang):
    Now there is an Activator which takes care of the searching the META-INFO of the camel components bundles for components and type converters.

TODO  we need to refactor the ResolverUtil to pull the osgi relating codes into camel-osgi module.
 

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48445#action_48445 ]

Claus Ibsen commented on CAMEL-1043:
------------------------------------

@Willem

The *file* and *ftp* component use org.apache.camel.util.FactoryFinder to load classes based on META-INF.
See FileEndpoint#createFileStrategy() and RemoteFileEndpoint#createRemoteFileStrategy()

Maybe the is something to be done for OSGi as well here.

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48446#action_48446 ]

Willem Jiang commented on CAMEL-1043:
-------------------------------------

@Claus

Thanks for pointing FactoryFinder out, I will create sub task to trace that issue.


> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48449#action_48449 ]

Claus Ibsen commented on CAMEL-1043:
------------------------------------

@Willem

CamelNamespaceHandler in camel-spring has some Class.forName in the init() method for detecting OSGi classes. Maybe it could be a problem? Well please take a look

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-osgi
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1043:
-------------------------------

    Component/s: camel-osgi

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-osgi
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48454#action_48454 ]

Claus Ibsen commented on CAMEL-1043:
------------------------------------

@Willem

And also org.apache.camel.converter.jaxp.XmlConverter uses a Class.forName

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-osgi
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48487#action_48487 ]

Willem Jiang commented on CAMEL-1043:
-------------------------------------

@Claus
I think the "Class.forName()" call is safe in OSGI platform,  the under layer class loader will take care of it.
We just need to make sure the camel-osgi package is imported in the camel-spring bundle.

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-osgi
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-1043) ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-1043.
---------------------------------

    Resolution: Fixed

> ResolverUtil - Refactor to allow easier extensions for OSGi resolutions for different OSGi platforms
> ----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1043
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1043
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-osgi
>    Affects Versions: 1.5.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 1.5.1, 2.0.0
>
>
> ResolverUtil has some internal code that detects if the classloader(s) is OSGi aware or not. ResolverUtil should expose strategy methods to allow us to create sub classes, or inject resolvers that cater for this OSGi resolution.
> Maybe expose some public API for end-users to customize this at configuration time, so they can let Camel run in any OSGi platform of choice.
> This is especially a problem with the dynamic type converters discoverer. That scans all bundles.

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