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 <xh...@gmail.com> on 2009/12/03 04:29:52 UTC

Keep the same convention of import/export packages

Hi,
    Currently, Geronimo uses many third-parties bundles (like pubished by
ServiceMix), also publishes some bundles by our own. So, whether importing
and exporting the packages at the same time, I think we need to have a same
convention. I checked the bundles published by ServiceMix, for those tool
components, like commons-*, they do not import their own packages. I also
found those bundles published by Felix always import those packages.
Generally specaking, it is hard to say which one is better. So, for
Geronimo, personally, I prefered the way of ServiceMix, which does not
import those packages at the same time for those tool-like components.
    Any comment ?
-- 
Ivan

Re: Keep the same convention of import/export packages

Posted by Ivan <xh...@gmail.com>.
Acutally both the styles are comfortable to me. So, let's always
import/export owned packages, maybe we would never encounter the
backward-compatiblity issue :-)

2009/12/3 David Jencks <da...@yahoo.com>

>
> On Dec 2, 2009, at 7:29 PM, Ivan wrote:
>
>  Hi,
>>    Currently, Geronimo uses many third-parties bundles (like pubished by
>> ServiceMix), also publishes some bundles by our own. So, whether importing
>> and exporting the packages at the same time, I think we need to have a same
>> convention. I checked the bundles published by ServiceMix, for those tool
>> components, like commons-*, they do not import their own packages. I also
>> found those bundles published by Felix always import those packages.
>>  Generally specaking, it is hard to say which one is better. So, for
>> Geronimo, personally, I prefered the way of ServiceMix, which does not
>> import those packages at the same time for those tool-like components.
>>    Any comment ?
>>
>
> I've had some discussions with Guillaume about this.  There are some
> circumstances where having 2 versions of a jar, importing what you export,
> and loading the jars in the wrong order can cause problems.  This is why
> Guillaume has adopted the servicemix approach.
>
> I think this is wrong and that such problems should be avoided by package
> versioning and scoping or bundle isolation.  I don't think rfc 138 is going
> to provide a very usable solution but it is likely to be the best we can
> come up with at this point.
>
> Anyway I think we should follow everyone else's advice and import what we
> export.  It is really only crucial when a bundle registers some services but
> I think it is still good practice.
>
> thanks
> david jencks
>
>
>  --
>> Ivan
>>
>
>


-- 
Ivan

Re: Keep the same convention of import/export packages

Posted by David Jencks <da...@yahoo.com>.
On Dec 2, 2009, at 7:29 PM, Ivan wrote:

> Hi,
>     Currently, Geronimo uses many third-parties bundles (like  
> pubished by ServiceMix), also publishes some bundles by our own. So,  
> whether importing and exporting the packages at the same time, I  
> think we need to have a same convention. I checked the bundles  
> published by ServiceMix, for those tool components, like commons-*,  
> they do not import their own packages. I also found those bundles  
> published by Felix always import those packages.  Generally  
> specaking, it is hard to say which one is better. So, for Geronimo,  
> personally, I prefered the way of ServiceMix, which does not import  
> those packages at the same time for those tool-like components.
>     Any comment ?

I've had some discussions with Guillaume about this.  There are some  
circumstances where having 2 versions of a jar, importing what you  
export, and loading the jars in the wrong order can cause problems.   
This is why Guillaume has adopted the servicemix approach.

I think this is wrong and that such problems should be avoided by  
package versioning and scoping or bundle isolation.  I don't think rfc  
138 is going to provide a very usable solution but it is likely to be  
the best we can come up with at this point.

Anyway I think we should follow everyone else's advice and import what  
we export.  It is really only crucial when a bundle registers some  
services but I think it is still good practice.

thanks
david jencks


> -- 
> Ivan