Starting bundles twice

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Starting bundles twice

guiramos
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
Reply | Threaded
Open this post in threaded view
|

Re: Starting bundles twice

jbonofre
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
>
Reply | Threaded
Open this post in threaded view
|

Re: Starting bundles twice

jbonofre
In reply to this post by guiramos
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
>
Reply | Threaded
Open this post in threaded view
|

Re: Starting bundles twice

guiramos
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