Hi,

If you are using only one bundle, the test which you showed holds true.
But when there are multiple bundles, and bundles are utilizing services
exposed by other OSGI bundles.
In these case bundles are dependent on each other.

I am not able to simulate the situation, hence can not provide accurate
steps to replicate to this problem.
But as I believe, multiple folders for same Bundle can get created if
bundles are dependent on each other.
May be there is certain way to update bundles, when they are dependent on
each other and hence it may not be a servicemix bug, but is happening due to
wrong way of updating bundles.

The scenario of dependent bundles can be like this.
Bundle A is a independent bundle.
Bundle B uses service exposed by Bundle A
Bundle C uses service exposed by Bundle B.

In this case if you are changing code for Bundle B and want to update it.
How should one do it.

With Regards
Harbeer Kadian



Freeman Fang wrote:
> 
> Hi,
> 
> Could you use the latest SMX 4.2 SNAPSHOT[1] kit?  As SMX4.2 will be  
> released soon.
> 
>  From my test, the osgi:update works well with the snapshot kit,  I  
> can see my changes reflect after each time I do osgi:update
> 
> Btw, the content in the bundle${id} folder is something like
> 
> -rw-r--r--    1 ffang  staff     3  3  4 22:38 bundle.id
> -rw-r--r--    1 ffang  staff    13  3  4 22:44 bundle.lastmodified
> -rw-r--r--    1 ffang  staff   103  3  4 22:38 bundle.location
> -rw-r--r--    1 ffang  staff     2  3  4 22:38 bundle.startlevel
> -rw-r--r--    1 ffang  staff     6  3  4 22:42 bundle.state
> -rw-r--r--    1 ffang  staff     1  3  4 22:44 refresh.counter
> drwxr-xr-x    4 ffang  staff   136  3  4 22:44 version4.0
> 
> given I update 4 times, so I have version4.0 folder, but if I update 5  
> times, I can see version5.0 folder.
> 
> 
> Freeman
> 
> 
> [1]https://repository.apache.org/content/groups/snapshots-group/org/apache/servicemix/apache-servicemix/4.1.0-SNAPSHOT/
> On 2010-3-4, at 下午10:05, Harbeer Kadian wrote:
> 
>>
>> Hi,
>>
>> I have created a OSGI bundle with version 1.0-SNAPSHOT.
>> When i install this bundle in the servicemix 4.0
>> I get a new folder in the cache directory having name same as what  
>> bundle id
>> is assigned by servicemix for this bundle.
>> Inside this folder, i get another folder with name 1.
>> Inside folder with name 1, i can see my osgi bundle.
>>
>> Now whenever i change code in this bundle.
>> I run following command.
>> osgi:update <Bundle-Id>
>> And when i use the functionality, i found that the changes done to  
>> the code
>> are not reflected there.
>>
>> So i looked the cache directory.
>> And i found that there are multiple folders inside the folder having  
>> name of
>> <Bundle-Id>
>> Some thing like 1, 5, 13 etc.
>>
>> The workaround for this problem is to uninstall the bundle and then  
>> do a
>> fresh installation again using command
>> osgi:install -s mvn:<group-id>/<artifact-id>
>>
>> Even sometimes i have to shutdown the servicemix to get my changes
>> reflected.
>>
>> Is this problem because of the name of version 1.0-SNAPSHOT.
>>
>> With Regards
>> Harbeer Kadian
>>
>> -- 
>> View this message in context:
>> http://old.nabble.com/Getting-multiple-bundles-in-cache-directory-of-ServiceMix-tp27781176p27781176.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
> 
> 
> -- 
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Getting-multiple-bundles-in-cache-directory-of-ServiceMix-tp27781176p27790198.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to