• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One-Way RPC mode vs. Non-blocking RPC invocation??

 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can some expert explain to me the difference between the One-Way RPC mode and Non-Blocking RPC invocation mode? and in real life example to use the One-Way RPC mode and Non-Blocking RPC invocation mode?


In BulePrint Chapter 3, page 46 states JAX-RPC supports three modes of operations:

1.Synchronoous request-response mode
2.One-Way RPC mode - ...No return value or exception is expected on this call.
3.Non-Blocking RPC invocation mode - ..Later, the client processing the remote method returned by performing a blocked receive call or by polling for the return value.

Also, on BulePring page 96 there is a diagram indicationg the Travel Agency Service Asynchornous iteraction example.

From the travel agency example in this diagram, does it use the Non-Blokcing RPC invocation mode or One-Way RPC mode? To me, the Non-Blocking RPC defination is more fit and make sense here because the agency need to get the response eventually anyway by polling periodically.

Then, in the real world, what other good example to fit for the One-Way RPC mode? A lot of books do not distinciate the One-Way or Non-Blocking mode clearly. Instead they just say ansyncronized One-Way design combined with JMS to accomodiate with it.

I'm confused... Please shed some light on this...
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mikalai Zaikin's (MZ) guide might help. Look at http://java.boot.by/wsd-guide/ch04s06.html . For 1-way, the wsdl specifies only an input; there is no output.

I think you are correct that that one in page 96 is a Non-blocking technique. It returns immediately.

Also page 363 and 364 discusses further on asynchronous issues.
 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to define the Non-Blocking ansyn webservice in the WSDL? Should the output message still defined but just return void? Any example on it?
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Non-blocking, it doesnt matter.

The method will return immediately, after throwing the processing asynchronously to, for example, a message-driven bean.

Whether it is void or not, control will return asap to the client.
 
Helen Ge
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesus,

It does what you described behind the scene, but I'd like to know exactly what it should defined in the WSDL? and also, should considering client side using stub/dynamic proxy/DII or doen't matter?

Real example code may helps me.
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The way asynchronous client code is written is usually vendor-specific because it involves the concept of callbacks or polling which is not specified in the SOAP specification.

For instance, some Weblogic-specific code is available at
http://e-docs.bea.com/wls/docs81/webserv/client.html#1069326
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic