Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » ECF proxies when using Gemini Blueprint
ECF proxies when using Gemini Blueprint [message #1006489] Thu, 31 January 2013 13:41 Go to next message
Joerg Saini is currently offline Joerg SainiFriend
Messages: 8
Registered: January 2013
Junior Member
We have been evaluating the Eclipse Communication Framework (ECF) with Gemini Blueprint. After some experimentation with the existing ECF examples and modifications upon them we have hit a wall when it comes to async remote calls.

In particular, after switching to Blueprint the generated proxies used for the async calls are created by Gemini Blueprint, not giving ECF the chance to create them and apply its magic. For more information have a look at the thread over at the ECF forum http://www.eclipse.org/forums/index.php/t/452118/.

Disclaimer: I'm only just starting on these concepts and there is a chance that I'm missing something obvious. Please be gentle Smile

Thanks!
Re: ECF proxies when using Gemini Blueprint [message #1006516 is a reply to message #1006489] Thu, 31 January 2013 14:48 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Apparently Gemini Blueprint takes into account the visible interfaces so if some ECF interfaces are hidden, it might mean Blueprint and ECF are not sharing the relevant classes correctly.
Re: ECF proxies when using Gemini Blueprint [message #1007273 is a reply to message #1006516] Tue, 05 February 2013 10:35 Go to previous messageGo to next message
Konstantinos Mavridis is currently offline Konstantinos MavridisFriend
Messages: 2
Registered: November 2012
Junior Member
To help push forward this issue, I have put up on GitHub a hello example using Gemini Blueprint based right off org.eclipse.ecf.examples.remoteservices.hello.ds.

The error appears as described:
java.lang.ClassCastException: $Proxy2 cannot be cast to org.eclipse.ecf.remoteservice.IRemoteServiceProxy


Everyone is welcome to have a look at:
https:/ /github.com/Konstantinos-Mavridis/bluECF

regards,
Konstantinos

[Updated on: Tue, 05 February 2013 14:08]

Report message to a moderator

Re: ECF proxies when using Gemini Blueprint [message #1007377 is a reply to message #1007273] Tue, 05 February 2013 16:36 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Thanks Konstantinos!

Please note that I currently don't have time to dig into this, but if anyone else would like to, I'm happy to comment on their findings. As I keep pointing out, my understanding of Gemini Blueprint implementation is minimal, which means almost anyone is equally able to have a go at debugging this issue! That's either good news or bad news depending on who you are. Wink I will however post to gemini-dev to see if anyone else has time to look into this.
Re: ECF proxies when using Gemini Blueprint [message #1007392 is a reply to message #1007273] Tue, 05 February 2013 17:36 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Konstantinos.

Here's my impressions of what's happening. I haven't looked at this closely yet, so please take this with a grain of salt.

In this posting

http://www.eclipse.org/forums/index.php/mv/msg/452118/1006481/#msg_1006481

Joerg Saini posts this:

Joerg Saini wrote on Thu, 31 January 2013 08:09
When using DS the proxy is created by ECF and in particular org.eclipse.ecf.remoteservice.AbstractRemoteService$ProxyClassLoader. The createProxy() methods seem overly likely (even though I haven't verified through a debug session yet).

The generated instance implements the following interfaces:

interface org.eclipse.ecf.examples.remoteservices.hello.IHello,
interface org.eclipse.ecf.examples.remoteservices.hello.IHelloAsync,
interface org.eclipse.ecf.remoteservice.IRemoteServiceProxy

When using Blueprint the proxy creation appears to be handled through Gemini Blueprint only, involving the org.eclipse.gemini.blueprint.context.support.internal.classloader.ChainedClassLoader.

In this case the generated proxy implements the interfaces:

interface org.eclipse.ecf.examples.remoteservices.hello.IHello,
interface org.eclipse.gemini.blueprint.service.importer.ImportedOsgiServiceProxy,
interface org.springframework.aop.IntroductionInfo,
interface java.io.Serializable,
interface org.springframework.core.InfrastructureProxy,
interface org.springframework.aop.SpringProxy

Should the proxy creation have been delegated to ECF in the second case? Is there a way to cause this?

I'll put together a post to the Gemini forum as well.


[Scott]

My belief is that this issue that Joerg identifies in proxy creation...is affecting you (Konstantinos) in a similar way...i.e. you are unable to cast the proxy to IRemoteServiceProxy...which is an ECF remote service interface. This interface (IRemoteServiceProxy) is automatically added to a proxy by ECF's proxy creation code (unless disabled through proxy).

This *appears* to me that the Gemini importer is somehow intercepting the remote service import...which must be done by ECF's RemoteServiceAdmin implementation, so that the appropriate proxy is created. Instead...it seems that the remote service import is done by Gemini's importer, and ECF's RemoteServiceAdmin is not used.

If this is correct, I don't know why the Gemini import would do this...as the OSGi Remote Service Admin spec provides for 'config providers' that are uniquely identified...meaning that it should be possible for both ECF's and Gemini's remote service implementation to coexist...and not conflict with one another.

Konstantinos...I assume that the ECF remote service examples run properly for you when run without Gemini...is that correct? If that's true, then it lends some evidence for my hypothesis that the Gemini Remote Service importer is creating the proxy, rather than the ECF code (which should be doing it).

For Gemini folks: Is there some description and/or code references for the Gemini Remote Service Admin implementation? Or perhaps debugging/tracing that can be turned on...so that the Gemini remote services import processing can be turned on?

Thanks.




Re: ECF proxies when using Gemini Blueprint [message #1007452 is a reply to message #1007392] Tue, 05 February 2013 21:54 Go to previous message
Konstantinos Mavridis is currently offline Konstantinos MavridisFriend
Messages: 2
Registered: November 2012
Junior Member
Hello Glyn, Scott,

Thanks for the insight. I put together the modified example in an attempt to help debug this and I'll keep looking into it, though my knowledge on the involved technologies is currently limited.

Scott, I can verify that the problem is on the consumer-side proxy. The examples work fine without Gemini, in fact they work even when the server-side uses Gemini and the consumer-side uses a service tracker or declarative service.

A question here, since you mentioned a "Gemini Remote Service Admin"; is there an implementation of Remote Service Admin (chapter 122) within Gemini as well?

regards,
Konstantinos
Previous Topic:Gemini DBAccess Maven Artifacts
Next Topic:Gemini Blueprint OSGi empty service list with listener
Goto Forum:
  


Current Time: Fri Dec 19 20:18:51 GMT 2014

Powered by FUDForum. Page generated in 0.02342 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software