Prev | Current Page 326 | Next

Binildas A Christudas

"Service-Oriented Java Business Integration"

The proxied JBI endpoint can then be invoked just like
a normal POJO.
JBI Proxy
[ 244 ]
If you want to define a JBI proxy within a SU, you can follow the configuration given
as follows:
service="test:echoService"
serviceInterface="test.Echo">



context="#context"
type="test.IService" />




Let us now look into a few examples to make the concept clearer.
JBI Proxy Sample Implementing
Compatible Interface
First, we will create a JBI proxy implementing an interface compatible with the target
service. Then, in place of the target service we will use the proxy instance, so that
any calls intended for the target service will be first routed to the proxy. The proxy
in turn will delegate the call to the target service. The structural relationship between
various classes participating in the interaction is shown in the following figure:
<>
<> <>
<>
EchoProxyService
echo : IEcho
+setEcho(in echo : IEcho)
+echo(in input : string)
JbiProxy
delegate
?????? ?????? interface
IEcho
+echo(in input : string)
+echo(in input : string)
TargetService
proxy
*
*
*
*
Chapter 13
[ 245 ]
Here, EchoProxyService is the class which we later expose in the JBI bus as the
service.


Pages:
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338