users@jax-ws.java.net

Re: How to implement "multiplexed endpoint reference" pattern on JAX-WS 2.1?

From: Andreas Loew <Andreas.Loew_at_Sun.COM>
Date: Fri, 11 May 2007 23:39:31 +0200

Vivek, All,

Vivek Pandey schrieb:

> JAX-WS 2.1.1 RI supports Stateful Web Service, I think this should
> serve your purpose.

hmm, sorry - I don't really think so :-(

#1:
Does this approach scale horizontally, i.e. how can it be applied to a
cluster of two or more homogeneous app server instances behind a HW
load balancer, to which the same service implementation WAR has been
deployed and which are to be addressed from the outside world using the
load balancer's IP address?

Let's say the load balancer routes my first request to create a pull
point to the "CreatePullPoint" endpoint implementation on node 1, which
then creates a new "PullPoint" endpoint instance on node 1 with a
particular new pull point ID of 1234 and returns an EPR to it.

Suppose I manage to modify the outbound EPR correctly such that it sends
the loadbalancer's host name/IP address to the client rather than that
of node 1, what will happen when the loadbalancer directs a subsequent
request from this client for ID 1234 to node 2?

#2:
 From my understanding, I don't really need *stateful instances* but
rather a way to *map/marshal all the state* needed to represent the
"instance" *into the EPR's reference parameters* on pull point creation
and unmarshal it again rom there when a subsequent request arrives in
order to know which specific endpoint it relates to. This also is what
CXF's multiplexed (but stateless) implementation is about.

Anyway, I think having a detailed look onto how the
StatefulWebServiceManager has been implemented might help me to
understand how to deal with the EPR in an appropriate way...

My base question is: How can I direct requests to a pull point EPR with
the reference parameter 1234 and another request to a pull point EPR
with reference parameter 5678 to the same endpoint implementation class,
but allow this EPR implementation class to access the EPR reference
parameter content?

Can you provide some guidance or pointers on how to implement this?

Again, thanks very much for your help!

Best regards,

Andreas

-- 
Andreas Loew
Java Architect
Sun Microsystems (Germany)