Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » org.eclipse.scout.service.services service vs. proxy
org.eclipse.scout.service.services service vs. proxy [message #1220233] Tue, 10 December 2013 14:17 Go to next message
Benno Baumgartner is currently offline Benno Baumgartner
Messages: 2
Registered: July 2009
Junior Member
Hello

I have a question regarding service registration through the org.eclipse.scout.service.services extension point. A service can be registered through a service node or a proxy node. I wonder what the difference is between:

   <extension
         name=""
         point="org.eclipse.scout.service.services">
      <proxy
            factory="org.eclipse.scout.rt.client.services.ClientProxyServiceFactory"
            class="test.shared.services.IDesktopService">
      </proxy>
   </extension>


and

   <extension
         name=""
         point="org.eclipse.scout.service.services">
      <service
            factory="org.eclipse.scout.rt.client.services.ClientProxyServiceFactory"
            class="test.shared.services.IDesktopService">
      </service>
   </extension>


I've tried both on the client side and both appear to work just fine. Is there any difference? Should I use proxy on the client side?

Thank you
Benno
Re: org.eclipse.scout.service.services service vs. proxy [message #1220266 is a reply to message #1220233] Tue, 10 December 2013 18:06 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 728
Registered: October 2011
Senior Member
I remember that someone told me, that this is legacy stuff (the difference between service and proxy)... I both cases you get a proxy-service that will connect to the server (see the Client/Server communication page).

I think this is something we should clean up... I will ask or check the code... and let you know...

Thank you for bringing this point in the forum for discussion.
Re: org.eclipse.scout.service.services service vs. proxy [message #1220350 is a reply to message #1220266] Wed, 11 December 2013 09:15 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 728
Registered: October 2011
Senior Member
Inputs from Andreas Bur:

Code:
org.eclipse.scout.service.internal.ServicesExtensionManager

With a proxy registration:
- factory is mandatory
- you can only register interfaces (if you try to register a class with a proxy it will be ignored)
- default ServiceRanking is -2

With a service registration:
- factory can be omitted (default factory is used)
- you register Interfaces and classes
- default ServiceRanking is 0


Both are very similar, in a lot of cases you can use proxy or service registration... In your example, only the "service ranking" is different.

Feel free to make a proposal, if you think we should improve something in this domain.
Re: org.eclipse.scout.service.services service vs. proxy [message #1220354 is a reply to message #1220350] Wed, 11 December 2013 09:26 Go to previous message
Benno Baumgartner is currently offline Benno Baumgartner
Messages: 2
Registered: July 2009
Junior Member
Thank you very much for your answers. I think I'm going to use service everywhere with a proxy factory on the client side for consistency reasons.
Previous Topic:Target platform: why is the PDE feature included?
Next Topic:Clean server shutdown
Goto Forum:
  


Current Time: Tue Sep 30 10:13:18 GMT 2014

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

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