Had an offline chat with Aruna,

Regarding  refresh all nested level bundles, If we assume developer will
follow all osgi best practices( yes, they should be enforced) like not keep
object references of classes in imported packages, then we can simply
continue with one level dependency closer refreshing process.

Thanks
Shameera.


On Fri, May 16, 2014 at 11:57 AM, Shameera Rathnayaka <shame...@wso2.com>wrote:

> Hi Aruna,
>
> If you rewire the first level of bundles in dependency closure IMO of
> course you need to do it for all next level bundles too.
>
> I think we came to a conclusion where we doesn't support hot update(with
> patch) for top level bundle in bundle hierarchy as it may cause to refresh
> almost all the bundle in runtime. which is same as restart.
>
> List of top level bundles is yet to be decided. You can maintain a
> property with you patch meta file to provide this information, where hot
> patch deployer print a WARN to restart the server if there is a such top
> level bundle comes with patches or deployer will ask a permission to
> restart the system after applying all the patches if require.
>
> thanks,
> Shameera.
>
>
> On Fri, May 16, 2014 at 11:43 AM, Aruna Karunarathna <ar...@wso2.com>wrote:
>
>> Hi all,
>>
>> Currently I am involved in the R & D of the Hot patch deployment of OSGi
>> Bundles. As per now I have implemented the hot deployment as follows.
>>
>>
>>    - Update the bundle using an InputStream
>>    - Get the FrameworkWiring using the SystemBundle
>>    - Get the bundle's dependency closure using the FrameworkWiring
>>    - Then finally refresh the the bundles within the dependency closure
>>
>>
>>  My problem is that, is it enough to refresh the first level dependencies
>> only to the hot deployment to be successful; or do I have to refresh the
>> next level bundles also.
>>
>> I am not clear enough according to the documentation in [1].
>>
>> [1].
>> http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/wiring/FrameworkWiring.html#refreshBundles(java.util.Collection,
>> org.osgi.framework.FrameworkListener...)
>>
>>
>>
>> Regards,
>> --
>>
>> * Aruna Sujith Karunarathna* | Software Engineer
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 71 9040362 | Work: +94 112145345
>> Email: ar...@wso2.com | Web: www.wso2.com
>>
>>
>
>
>
> --
> *Software Engineer - WSO2 Inc.*
> *email: shameera AT wso2.com <shame...@wso2.com> , shameera AT apache.org
> <shame...@apache.org>*
> *phone:  +9471 922 1454 <%2B9471%20922%201454>*
>
> *Linked in : *http://lk.linkedin.com/pub/shameera-rathnayaka/1a/661/561
> *Twitter     : *https://twitter.com/Shameera_R
>



-- 
*Software Engineer - WSO2 Inc.*
*email: shameera AT wso2.com <shame...@wso2.com> , shameera AT apache.org
<shame...@apache.org>*
*phone:  +9471 922 1454*

*Linked in : *http://lk.linkedin.com/pub/shameera-rathnayaka/1a/661/561
*Twitter     : *https://twitter.com/Shameera_R
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to