You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by guiramos <gu...@gmail.com> on 2018/05/14 18:32:28 UTC

Starting bundles twice

Hello there.

I switched to karaf 4.2.0 and I noticed that my bundles, with components
(@Components immediate=true) are being activated twice. I assume something
changed but could not find what?

The same bundles are running fine in 4.1.5

Can you please help me?

Thank you.



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html

Re: Starting bundles twice

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

don't you have configuration associated to your SCR component ?

Regards
JB

On 14/05/2018 20:32, guiramos wrote:
> Hello there.
> 
> I switched to karaf 4.2.0 and I noticed that my bundles, with components
> (@Components immediate=true) are being activated twice. I assume something
> changed but could not find what?
> 
> The same bundles are running fine in 4.1.5
> 
> Can you please help me?
> 
> Thank you.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
> 

Re: Starting bundles twice

Posted by guiramos <gu...@gmail.com>.
Yes, I have the component with the @Activate

@Component(name = "transportService", immediate = true)
@Activate
public void preStart() {

}

@Deactivate
protected void preDestroy() throws Exception {

}

osgi.bnd
Import-Package: \
	*
    

And pom.xml
<plugin>
	<groupId>org.apache.felix</groupId>
	<artifactId>maven-bundle-plugin</artifactId>
	<version>3.0.0</version>
	<extensions>true</extensions>
	<configuration>
	  <instructions>
	  <_include>osgi.bnd</_include>
	   </instructions>
	</configuration>
</plugin>


As mentioned, there's nothing special about this bundle. It's running
perfectly on 4.1.5
Is there anything I need to activate.





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html

Re: Starting bundles twice

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I would need some details about your bundles. Do you have a factory or 
@Activate method ?

Any chance to share a bundle ?

Thanks
Regards
JB

On 14/05/2018 20:32, guiramos wrote:
> Hello there.
> 
> I switched to karaf 4.2.0 and I noticed that my bundles, with components
> (@Components immediate=true) are being activated twice. I assume something
> changed but could not find what?
> 
> The same bundles are running fine in 4.1.5
> 
> Can you please help me?
> 
> Thank you.
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>