Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Routing request for an execution from within the partitioned space

Hello,

suppose I have in space two service beans, one uses the other:

<bean id="serviceAAA" class="my.service.AAA">
</bean>

<bean id="serviceBBB" class="my.service.BBB">
    <property name="aaa" ref="serviceAAA" />
</bean>

Now suppose that I am running in a multi-partition setup, and from the bean "serviceBBB" I want to invoke a method on the bean "serviceAAA" which is located in a different partition. For a remote service I would have to set a remoteRoutingHandler on an executor proxy to route requests to a correct partition. But how should I proceed if both beans are defined in the same space and there is no executor proxy at all? Or should I define in such case an executor proxy in this space as well, and use it from the bean "serviceBBB" instead of using "serviceAAA" directly, like this:

<bean id="serviceAAA" class="my.service.AAA">
</bean>

<os-remoting:service-exporter id="serviceExporter">
    <os-remoting:service ref="serviceAAA" />
</os-remoting>

<os-remoting:executor-proxy id="serviceAAAproxy" giga-space="gigaSpace" interface="my.service.AAAInterface">
    <os-remoting:routing handler ref="myRoutingHandler" />
</os-remoting:executor-proxy>


<bean id="serviceBBB" class="my.service.BBB">
    <property name="aaa" ref="serviceAAAproxy" />
</bean>

asked 2017-03-27 05:57:39 -0600

Alexey Serdyuk gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

Yep. If you want to perform cascading calls from one service to another your PU will act as a client interacting with other service instance(s) running within the cluster.

You can construct a proxy via pu.xml of via API.

https://docs.gigaspaces.com/xap120/ex...

answered 2017-03-27 08:33:35 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-03-27 05:57:39 -0600

Seen: 17 times

Last updated: Mar 27