Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Declarative Services in an RCP e4 Application(bind methods are not called)
Declarative Services in an RCP e4 Application [message #852086] Sat, 21 April 2012 13:01 Go to next message
Heike Winkelvoß is currently offline Heike Winkelvoß
Messages: 11
Registered: April 2012
Junior Member
Hello,

I am migrating an Eclipse 3x-RCP-Application to an e4-RCP application. The e4 application is starting, but my DS-Component bind-Methods are not called

The same is valid when I define an OSGi-runconfiguration and starting my DS-component Bundles: they are all active, but the declared bind-Methods are not called.

with Eclipse 3x it worked fine so that I guess that there is no error in the service component definitions.

Here are the bundles I am starting in the OSGi-runconfig:

id State Bundle
0 ACTIVE org.eclipse.osgi_3.8.0.v20120312-2035
Fragments=20, 31
1 RESOLVED org.eclipse.core.runtime.compatibility.registry_3.5.0.v20110505
Master=34
2 ACTIVE de.egladil.base.log4j_1.1.0
3 ACTIVE de.egladil.mcmatheraetsel.resources.online_1.0.0
4 ACTIVE de.egladil.mcmatheraetsel.persistence.file_1.0.0
5 ACTIVE org.eclipse.equinox.util_1.0.200.v20100503
6 ACTIVE org.eclipse.core.runtime_3.8.0.v20120308-2101
7 ACTIVE com.springsource.org.bouncycastle.jce_1.39.0
8 ACTIVE org.apache.felix.gogo.shell_0.8.0.v201110170705
9 ACTIVE com.springsource.org.apache.commons.codec_1.4.0
10 ACTIVE org.eclipse.core.jobs_3.5.200.v20120113-1913
11 ACTIVE de.egladil.base.event_1.1.0
12 ACTIVE de.egladil.mcmatheraetsel.resources.api_1.0.0
13 ACTIVE org.apache.felix.gogo.command_0.8.0.v201108120515
14 ACTIVE de.egladil.mcmatheraetsel.domain_1.0.0
15 ACTIVE de.egladil.mcmatheraetsel.business.api_1.0.0
16 ACTIVE de.egladil.base.exceptions_1.1.0
17 ACTIVE de.egladil.mcmatheraetsel.business.osgi_1.0.0
18 ACTIVE org.eclipse.equinox.app_1.3.100.v20111010-1614
19 ACTIVE org.eclipse.equinox.common_3.6.100.v20120209-1951
20 RESOLVED org.eclipse.equinox.transforms.hook_1.0.300.v20111010-1614
Master=0
21 ACTIVE com.springsource.org.apache.commons.logging_1.1.1
22 RESOLVED com.springsource.slf4j.log4j_1.5.0
Master=28
23 ACTIVE org.eclipse.equinox.console_1.0.0.v20111215-1210
24 ACTIVE de.egladil.mcpunktgenerator.domain_1.0.0
25 ACTIVE de.egladil.mcmatheraetsel.persistence.api_1.0.0
26 ACTIVE com.springsource.org.apache.commons.io_1.4.0
27 ACTIVE org.eclipse.core.contenttype_3.4.1.R35x_v20090826-0451
28 ACTIVE com.springsource.slf4j.api_1.5.0
Fragments=22
29 ACTIVE de.egladil.mcmatheraetsel.resources.offline_1.0.0
30 ACTIVE org.eclipse.equinox.preferences_3.5.0.v20120120-1210
31 RESOLVED org.eclipse.equinox.weaving.hook_1.0.200.v20120307-1407
Master=0
32 ACTIVE de.idyl.crypto.zip_1.0.0
33 ACTIVE de.egladil.mcmatheraetsel.files_1.0.0
34 ACTIVE org.eclipse.equinox.registry_3.5.200.v20111010-1614
Fragments=1
35 ACTIVE com.springsource.org.apache.commons.httpclient_3.1.0
36 ACTIVE org.eclipse.equinox.ds_1.2.0.v20100507
37 ACTIVE org.apache.felix.gogo.runtime_0.8.0.v201108120515
38 ACTIVE org.eclipse.osgi.services_3.3.0.v20120307-2102

the bundles 3, 4 and 17 define declarative service components. The DS-bundles
org.eclipse.equinox.ds_1.2.0.v20100507 (bundle 36)
org.eclipse.equinox.util_1.0.200.v20100503 (bundle 5)
org.eclipse.osgi.services_3.3.0.v20120307-2102 (bundle 38)

are active too.

I have a syso inside my bind-Method setResourcesService(...) but it does not appear on the console.

When I launch it in debug mode it is not halting inside this method.

Are there any bundles that I missed to start in difference with the Eclipse 3x-configuration? Are there any changes in the behaviour af DS in e4?

I would be very glad if somebody could help me.

Regards,
Heike
Re: Declarative Services in an RCP e4 Application [message #852169 is a reply to message #852086] Sat, 21 April 2012 14:55 Go to previous messageGo to next message
Heike Winkelvoß is currently offline Heike Winkelvoß
Messages: 11
Registered: April 2012
Junior Member
Hello,

in the meantime the problem was solved by myself but unfortunately I can not say how.

I just played with my configurations, made a maven-rebuild added a DS-component to my ui-bundle and now the services are bound property.

Nevertheless the OSGi-runconfig does NOT wire the services properly but the RCP-runconfiguration does.

Regards,
Heike
Re: Declarative Services in an RCP e4 Application [message #852203 is a reply to message #852169] Sat, 21 April 2012 15:37 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5259
Registered: July 2009
Senior Member
Are your bundle marked as lazy?

Tom

Am 21.04.12 20:55, schrieb Heike Winkelvoß:
> Hello,
>
> in the meantime the problem was solved by myself but unfortunately I can
> not say how.
>
> I just played with my configurations, made a maven-rebuild added a
> DS-component to my ui-bundle and now the services are bound property.
>
> Nevertheless the OSGi-runconfig does NOT wire the services properly but
> the RCP-runconfiguration does.
>
> Regards,
> Heike
Re: Declarative Services in an RCP e4 Application [message #852228 is a reply to message #852203] Sat, 21 April 2012 16:21 Go to previous messageGo to next message
Heike Winkelvoß is currently offline Heike Winkelvoß
Messages: 11
Registered: April 2012
Junior Member
Hello Tom,

in the beginning they were not all but I then changed the felix-configuration and rebuilt. Now they are marked as lazy. Should they?

Heike
Re: Declarative Services in an RCP e4 Application [message #852232 is a reply to message #852203] Sat, 21 April 2012 16:25 Go to previous messageGo to next message
Heike Winkelvoß is currently offline Heike Winkelvoß
Messages: 11
Registered: April 2012
Junior Member
Hello Tom,

thanks for your hint: when I removed the lazy-declaration from all DS-bundle-manifests, the OSGi-runconfiguration is wiring the ds-services too

Heike

edit: I'm sort of confused: I jus rebuilt (maven-felix), now all bundles are declared as lazy and both run configurations (OSGi and RCP) do well.

[Updated on: Sat, 21 April 2012 16:31]

Report message to a moderator

Re: Declarative Services in an RCP e4 Application [message #852737 is a reply to message #852232] Sun, 22 April 2012 04:55 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5259
Registered: July 2009
Senior Member
Hi,

This is very special to equinox which requires your bundles to be
specified as lazy to get the DS services registered.

Tom Watson once explained it to me but I can't remember why it was like
this.

Tom

Am 21.04.12 22:25, schrieb Heike Winkelvoß:
> Hello Tom,
>
> thanks for your hint: when I removed the lazy-declaration from all
> DS-bundle-manifests, the OSGi-runconfiguration is wiring the ds-services
> too
> Heike
Re: Declarative Services in an RCP e4 Application [message #866380 is a reply to message #852737] Mon, 30 April 2012 17:34 Go to previous message
Heike Winkelvoß is currently offline Heike Winkelvoß
Messages: 11
Registered: April 2012
Junior Member
Hi Tom,

thanks for your explanation.

Heike
Previous Topic:How to create an eclipse 4 project that includes JDT and PDE ?
Next Topic:hide menu items
Goto Forum:
  


Current Time: Thu Jul 31 19:45:31 EDT 2014

Powered by FUDForum. Page generated in 0.02123 seconds