On 1 Mar 2006, at 19:56, Dain Sundstrom wrote:
Actually, the more I think about it, you are bringing up the need
for another API for request routing. This would be something that
can make a decision about what to do with a request and could
optionally work with out session API. I'm thinking of something
that captures the concept of a request and a decision. Off the top
of my head...
public interface Request {
Object getHeader();
String getSessionId();
String getTarget();
}
public interface Router {
public RouterPolicy route(Request request);
}
RouterPolicy is an enumeration containing local, move session,
proxy, redirect.
With a simple API like this we should be able to enable smart load
balancing features contained in the clustering implementations out
there today, while keeping the caller's job simple.
Agreed - I think there's a requirement for the container (web/JBI/EJB/
SCA) to not worry at all about this stuff and just delegate to some
policy which decides whether to proxy, move, redirect. I hacked up a
little strawman
http://svn.apache.org/repos/asf/geronimo/trunk/modules/session/src/
java/org/apache/geronimo/session/remote/util/
DefaultRemoteSessionStrategy.java
but as you suggest, I think being able to pass in more metadata to
the policy would be a good idea
James
-------
http://radio.weblogs.com/0112098/