Hi Tom, hi Craig!

Another approach would be to extend the event model that is used for Session
(Servlet Spec SRV.10.1/SRV15.1.13) to fire events when a request is
completed..
Craig, would it be compliant with the spec to add another subclass of
SessionEvent (Maybe SessionRequestEvent)?

Then you could register your manager with newly created sessions as a
SessionListener.

Mika

----- Original Message -----
From: "Tom Drake" <[EMAIL PROTECTED]>
To: "Mika Goeckel" <[EMAIL PROTECTED]>
Cc: "Craig McClanahan" <[EMAIL PROTECTED]>
Sent: Tuesday, December 18, 2001 8:50 PM
Subject: load balancing - integration thoughts


> Mika and/or Craig:
>
> After having looked around the code, here's my thoughts
> about how to implement 'end-of-request' notification. Because
> we need post session updates to the 'other' repositories,
> and 'unlock' the session at the end of each Http request.
>
> Can you review and comment? Being new to Tomcat, I'd
> like some confirmation that I'm on the right track, or some
> gentle guidance.
>
> o.a.c.Manager.java
> - add new method
>     public void completeRequest(String sessionId);
>
> o.a.c.session.ManagerBase.java
> - add new method
>     public void completeRequest(String sessionId) {
>         // noop - non-distributed sessions don't care.
>     }
>
> o.a.c.Request.java
> - add new method
>     public void completeRequest();
>
> o.a.c.connector.ResponseBase.java
> - modify 'finishResponse()' by adding the following code
>    getRequest().completeRequest();
>
> o.a.c.connector.RequestBase.java
> - add new method
>     public void completeRequest() {
>         if (session != null) {
>             manager.completeRequest(session.getId());
>         }
>     }
>
> o.a.c.session.RepositoryManager - new class that extends
> StandardManager.java.
>
>     public void completeRequest(String sessionId) {
>         // deal with updating the remote repositories here....
>     }
>
> There's lots of other code in RepositoryManager, I just wanted to focus
> on the end-of-request notification bits.
>
>
> Regards,
>
> Tom Drake
> President, software/etc inc.
> Email: [EMAIL PROTECTED]
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to