[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ecf-dev] Remoting with ECF (with REST) in Eclipse RCP?
- From: Angelo zerr <angelo.zerr@xxxxxxxxx>
- Date: Wed, 11 Apr 2012 16:21:00 +0200
- Delivered-to: firstname.lastname@example.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=xpeR3HfoNfi2b+J4LJDynrCzoFMoNOay2VeB4tb0oMw=; b=oz+TF+VQ/IZ8IbrrMp6fn1qYd4UMeLcdGK+z3Eu4zIhVF8wBruM10viUrwhCVi6hYi s6IzojoOTXi6iJVTWqyJ1Rhvyxg3V2vJm26XBwA1bp4GlVA9O9w9bhjLhKsOPH/+bF7m YzBvP5SL5v0a0nYp8eDBR+t9l/OPmxc3PWRX2ck6WbjEmpSXS1inMeqBEy5XtZXqkOdh aImTaWSRabo+HlNztnGQSs0PrGfErDKNDzI0hj4oEYICOUgXZBUOeZHIioVdVtgFKn6K oyi9zrNixlVz4jwknjGAHZb84PuCNLR8ds7bVXF0Tp1vhpcRs/9PVcj+W0MX75js0AB3 4zCw==
Thanks Scott for your answer.
I know your DS samples that I have studied to develop the ECF support. The thing I don't understand is that in your samples you don't set the base URL of the server in the client side?
I would like customize that in my client side because server can be installed on localhost, on cloudbee with different port etc...
I will study RESTLET too to see how I can use it with ECF as soon as I will finish my articles with CXF DOSGi.
My need is that I wand export/import services with remote mode with the less code. My goal is to do the same thing than Spring Http Invoker http://static.springsource.org/spring/docs/2.5.x/reference/remoting.html#remoting-httpinvoker
but with JAX-RS to consumes/publish JSON.
Le 11 avril 2012 16:04, Scott Lewis <slewis@xxxxxxxxxxxxx>
a écrit :
On 4/11/2012 6:28 AM, Angelo zerr wrote:
When I see ECF samples, there is a lot of Java code to do in the Activator. In my case I would like just using Spring file to declare the client and server side.
The ECF Spring support problem is client side (not server side). On client side if you configure an URL of the server and you start the client BEFORE the server, the Spring bean cannot be created.
That's is the first problem (I will try to fix that if we decide to use ECF in our project).
ECF remote services is an implementation of the OSGi remote services specification...and as such simply makes available remoting for services registered (with appropriate properties) in the OSGI service registry. This registering of services can be done in java, ds, and...I'm quite certain...Spring. ECF has examples of doing it with java, and ds (for ds examples, see):
for host: http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.ds.host
for consumer/client: http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.ds.consumer
The ECF Spring support that was previously done (that I think you are referring to) is no longer needed...now that ECF implements the OSGi remote services spec (when that work was done, the standard did not exist...and so our impl of the standard did not exist).
So you should be able to use Spring (just like ds examples) to declare both your service host and consumer host...and how/when that's done (by Spring...or ds) will determine the timing of the availability of the service for remote access.
JAX-RS is not 'REST'. It's a standard/implementation. Restlet is listed here
The second problem is that ECF seems not support JAX-RS (just REST).
as an implementation of JAX-RS, and ECF has a provider based upon Restlet here
So without getting into specifics of the JAX-RS standard, versions, and compatibility tests, etc I would say that we in fact do support JAX-RS through our use of Restlet as a JAX-RS implementation.
To be direct about it, I guess I don't understand your need. As for 'coding' or not...like I said...ECF remote services simply implements the OSGi remote services specification...and so *any* mechanism for registering and accessing OSGi services (java, ds, Spring, etc) is suitable for using for remote services. No java code required...if not desired.
As I said you, I don't want code something. I give you how I do that with CXF and I hope you will understand my need.
The existence of the ECF Spring support (done in java, before the spec and impl existed as I said) may be confusing here as I think it implies that this is the only way to use ECF remote services with Spring. That's no longer true.