You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Joel Schuster <jo...@Navsys.com> on 2009/03/31 15:18:41 UTC

Duplicate Bundle Instances?

For both PaxLogging (Log Service Implementation) and my own iPOJO based class I'm using *.cfg files to configure being deployed via the FileInstall bundle.

I'm noticing that there seems to be two versions of each of these actually running. One that's not configured with the *.cfg files, and another that is.

To verify, in the PaxLogging the only thing I've changed is the name of the file that I'm logging to. In this case two different log files are being created, although only one is being written to.

For my iPOJO there are defiantly two instances. I'm setting a string to log out every 10 seconds (see previous emails from me to see code). There are then two threads, one with the string being null and the other with the string being set based on the config.

Is this a bug?

______________________________
Joel Schuster
Senior Software Engineer
NAVSYS Corporation
14960 Woodcarver Road
Colorado Springs, CO 80921
(719) 481-4877 x138
joels@navsys.com<ma...@navsys.com>

The information contained herein is confidential and intended solely for the use of the addressees. If the reader is not the intended recipient, you are hereby notified that any distribution or copying of this communication is prohibited. Further distribution without the sender's approval is also prohibited.  If you have received this communication in error, please notify us immediately by replying to the message and deleting it entirely from your computer. Thank you. NAVSYS Corporation.


Re: Duplicate Bundle Instances?

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,


On 31.03.2009, at 15:18, Joel Schuster wrote:

> For both PaxLogging (Log Service Implementation) and my own iPOJO  
> based class I'm using *.cfg files to configure being deployed via  
> the FileInstall bundle.
>
> I'm noticing that there seems to be two versions of each of these  
> actually running. One that's not configured with the *.cfg files,  
> and another that is.
>
> To verify, in the PaxLogging the only thing I've changed is the name  
> of the file that I'm logging to. In this case two different log  
> files are being created, although only one is being written to.
>
> For my iPOJO there are defiantly two instances. I'm setting a string  
> to log out every 10 seconds (see previous emails from me to see  
> code). There are then two threads, one with the string being null  
> and the other with the string being set based on the config.

How many iPOJO instances do you have ? Do find it, try the install the  
'arch' command and execute it (under Felix):
start http://ftp.fernuni-hagen.de/ftp-dir/pub/mirrors/www.apache.org/felix/org.apache.felix.ipojo.arch-1.2.0.jar
arch

This will list created instances. If two instances appears so, two  
instances were created :-) One sounds to have not the log name property.
If only one appears, try
arch -instance the-instance-name

This will dump the instance architecture, and told you how many pojo  
objects were created.
For example, the arch command architecture is:
instance component.type="org.apache.felix.ipojo.arch.ArchCommandImpl"  
state="valid" bundle="8" name="ArchCommand"
	object name="org.apache.felix.ipojo.arch.ArchCommandImpl@c3d029"   
<========== One POJO object created
         ...

According to these info, I'll be able to help you.

Regards,

Clement


>
>
> Is this a bug?
>
> ______________________________
> Joel Schuster
> Senior Software Engineer
> NAVSYS Corporation
> 14960 Woodcarver Road
> Colorado Springs, CO 80921
> (719) 481-4877 x138
> joels@navsys.com<ma...@navsys.com>
>
> The information contained herein is confidential and intended solely  
> for the use of the addressees. If the reader is not the intended  
> recipient, you are hereby notified that any distribution or copying  
> of this communication is prohibited. Further distribution without  
> the sender's approval is also prohibited.  If you have received this  
> communication in error, please notify us immediately by replying to  
> the message and deleting it entirely from your computer. Thank you.  
> NAVSYS Corporation.
>