Discussion:
[omniORB] LOCATION_FORWARD problem
Zoran Djekic
2012-02-27 13:20:03 UTC
Permalink
Hi,

I have idea to dispatch requests from my DispatcherServer to Server-s that
will process that requests. DispatcherServer and Server have the same
interfaces but in implementation of DispatcherServer functions is logic for
deciding on witch Server to forward request using
LOCATION_FORWARD(Server_ref, false). Problem is that when I throw
LOCATION_FORWARD client that invoked function on DispatcherServer don't use
reference of DisatcherServer any more (in next function calls) but
reference that is supplied in LOCATION_FORWARD exception. That means that
DispatcherServer is bypassed in this communication. What should I do to
make Client always call functions on reference of DispatcherServer?

Best regards,
Zoran Djekic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20120227/9c6accae/attachment.htm
Duncan Grisby
2012-02-29 18:50:36 UTC
Permalink
Post by Zoran Djekic
I have idea to dispatch requests from my DispatcherServer to Server-s
that will process that requests. DispatcherServer and Server have the
same interfaces but in implementation of DispatcherServer functions is
logic for deciding on witch Server to forward request using
LOCATION_FORWARD(Server_ref, false). Problem is that when I throw
LOCATION_FORWARD client that invoked function on DispatcherServer
don't use reference of DisatcherServer any more (in next function
calls) but reference that is supplied in LOCATION_FORWARD exception.
That means that DispatcherServer is bypassed in this communication.
What should I do to make Client always call functions on reference of
DispatcherServer?
That's the way location forwards are meant to work -- the new reference
is used until it fails, at which point the original reference is
retried. If that wasn't the behaviour, it would be impossible to build
implementation repositories or object migration schemes.

Can you just implement the forwarding behaviour at an application level?
Have the DispatcherServer return a reference to the Server object and
then explicitly do the call to it from the client?

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Loading...