Forum Controls
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

Java, the OLPC, and community responsibility

The "One Laptop Per Child" project has a great device ready to ship, but there's no Java on there. Let's think about working together to put Java on OLPC!
Replies: 2 - Pages: 1  
Threads: [ Previous | Next ]
  Click to reply to this thread Reply

Declarative OSGi services in eRCP

At 9:07 AM on Jul 31, 2008, Markus wrote:

Hi,

does eRCP support declarative servcies of OSGi. I took the 1.1.1 release
and added the plug-ins

org.eclipse.equinox.ds_1.0.0.v20070226.jar
org.eclipse.equinox.cm_3.2.0.v20070116.jar
org.eclipse.osgi.util_3.1.200.v20070605.jar

from Rclipse 3.3.2 release. If i look at them in the OSGi console, they
are all activated properly, but the servcie I declared as follows does not
appear:

<?xml version="1.0"?>


bind="setLs" unbind="unsetLs"/>


public class Test {
private LogService ls;

public void setLs(LogService ls) {
this.ls = ls;
}

public void unsetLs(LogService ls) {
this.ls = null;
}

protected void activate(ComponentContext ctx) {
ls.log(LogService.LOG_ERROR, "hallo");
}
}

If I place a breakpoint in the above methods, I can see, that the are not
called. I also placed the Service-Component in the MANIFEST.MF.

What could be wrong? Or is there no support for?

By the way I await the 1.2 release of eRCP. When is it planned to be
released?

Regards

Markus

  Click to reply to this thread Reply
1. At 8:22 AM on Aug 2, 2008, Uriel Liu wrote:

Re: Declarative OSGi services in eRCP

Hi Markus,

You can find the latest nightly build of eRCP at
http://download.eclipse.org/dsdp/ercp/downloads/ in case you need to try DS
with eRCP. The latest nightly build is synced with Eclipse 3.4 (for core
part).




"Markus"
???????:cab659e22f7c20d7cb9527d3cd35afac$1 at www dot eclipse dot org...
> Hi,
>
> does eRCP support declarative servcies of OSGi. I took the 1.1.1 release
> and added the plug-ins
> org.eclipse.equinox.ds_1.0.0.v20070226.jar
> org.eclipse.equinox.cm_3.2.0.v20070116.jar
> org.eclipse.osgi.util_3.1.200.v20070605.jar
>
> from Rclipse 3.3.2 release. If i look at them in the OSGi console, they
> are all activated properly, but the servcie I declared as follows does not
> appear:
>
> <?xml version="1.0"?>
>
>
> > bind="setLs" unbind="unsetLs"/>
>
>
> public class Test {
> private LogService ls;
>
> public void setLs(LogService ls) {
> this.ls = ls;
> }
>
> public void unsetLs(LogService ls) {
> this.ls = null;
> }
>
> protected void activate(ComponentContext ctx) {
> ls.log(LogService.LOG_ERROR, "hallo");
> }
> }
>
> If I place a breakpoint in the above methods, I can see, that the are not
> called. I also placed the Service-Component in the MANIFEST.MF.
>
> What could be wrong? Or is there no support for?
>
> By the way I await the 1.2 release of eRCP. When is it planned to be
> released?
>
> Regards
>
> Markus
>


  Click to reply to this thread Reply
2. At 6:40 AM on Aug 6, 2008, Markus wrote:

Re: Declarative OSGi services in eRCP

Hi,

now I came around to use declarative servcies for logging with eRCP 1.1.1.

I had to add these plug-ins from the Eclipse 3.3.2 release to the eRCP
plugins directory:

org.eclipse.equinox.ds_1.0.0.v20070226.jar
org.eclipse.equinox.cm_3.2.0.v20070116.jar
org.eclipse.osgi.util_3.1.200.v20070605.jar

Then my configuration worked well.

Markus


thread.rss_message