You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Jim Marino (JIRA)" <tu...@ws.apache.org> on 2006/12/06 18:05:23 UTC
[jira] Commented: (TUSCANY-973) HttpSessionScopeContainer should
use the HttpSession for session persistance
[ http://issues.apache.org/jira/browse/TUSCANY-973?page=comments#action_12456118 ]
Jim Marino commented on TUSCANY-973:
------------------------------------
This needs to implement semantics similar to conversational persistence and not just use the ServletContext as a container for replication to work properly. At a certain point, the servlet engine needs to be notified of a series of changes through setAttribute. This is the same pattern we have with conversational scope. We should also have a mechanism based on intents that specify whether a particular instance should failover, otherwise, we don't need to store it in the Servlet context.
> HttpSessionScopeContainer should use the HttpSession for session persistance
> ----------------------------------------------------------------------------
>
> Key: TUSCANY-973
> URL: http://issues.apache.org/jira/browse/TUSCANY-973
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Core
> Affects Versions: Java-M2
> Reporter: ant elder
> Assigned To: ant elder
> Fix For: Java-Mx
>
>
> The HttpSessionScopeContainer should use the HttpSession for session persistance instead of the HashMap it currently uses
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: HTTPSession state
Posted by Jim Marino <jm...@myromatours.com>.
On Dec 6, 2006, at 10:27 AM, Jeremy Boynes wrote:
>
> What notification? Change detection and/or optimization is
> something the servlet container needs to do as it own the session
> state.
Yes I agree. I didn't say that :-) If a state change occurs on a
session-scoped object, the servlet context needs to be notified. This
is generally done by resetting the object into the servlet context.
This doesn't have anything to do with replicating diffs (although a
fail-over mechanism may do that, e.g. Terracotta). This should be
done by Tuscany, probably after an invoke, not by the application
since it would tie the app to the servlet container and is generally
a PITA for developers (many web apps today don't get this right).
Jim
> We need to delegate all state to it otherwise we will risk partial
> replication (i.e. broken data) if the servlet container decides to
> migrate the session. Efficiency of this is down to the servlet
> container's implementation.
>
>>>
>>> Intent is a separate issue and we don't even have basic support
>>> for that yet (or do we?). Even if we did we can map this to
>>> whether the servlet is <distributable> or not.
>>>
>> Servlet? Some components we may want fail-over for, some we may
>> not. We need a way to distinguish this.
>
> Nice feature but for now we have none and doing this would give us
> an option. Cherry picking which at a component by component level
> can be done later (e.g. when we have something like the intent
> mechanism that allows the distinction to made).
>
> --
> Jeremy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: HTTPSession state
Posted by Jeremy Boynes <jb...@apache.org>.
On Dec 6, 2006, at 10:17 AM, Jim Marino wrote:
>
> On Dec 6, 2006, at 10:04 AM, Jeremy Boynes wrote:
>
>> On Dec 6, 2006, at 9:05 AM, Jim Marino (JIRA) wrote:
>>
>>> [ http://issues.apache.org/jira/browse/TUSCANY-973?
>>> page=comments#action_12456118 ]
>>>
>>> Jim Marino commented on TUSCANY-973:
>>> ------------------------------------
>>>
>>> This needs to implement semantics similar to conversational
>>> persistence and not just use the ServletContext as a container
>>> for replication to work properly. At a certain point, the servlet
>>> engine needs to be notified of a series of changes through
>>> setAttribute. This is the same pattern we have with
>>> conversational scope. We should also have a mechanism based on
>>> intents that specify whether a particular instance should
>>> failover, otherwise, we don't need to store it in the Servlet
>>> context.
>>
>> I don't see this. The conversation scope here is the HTTP session
>> and that is represented by the HTTPSession managed by the
>> ServletContext. That seems an obvious place to be placing the state.
> Yes that is exactly what I am saying. However, notification that
> state has changed needs to be done similar to the way we are
> handling conversation persistence. None of this would use the
> conversational scope container.
What notification? Change detection and/or optimization is something
the servlet container needs to do as it own the session state. We
need to delegate all state to it otherwise we will risk partial
replication (i.e. broken data) if the servlet container decides to
migrate the session. Efficiency of this is down to the servlet
container's implementation.
>>
>> Intent is a separate issue and we don't even have basic support
>> for that yet (or do we?). Even if we did we can map this to
>> whether the servlet is <distributable> or not.
>>
> Servlet? Some components we may want fail-over for, some we may
> not. We need a way to distinguish this.
Nice feature but for now we have none and doing this would give us an
option. Cherry picking which at a component by component level can be
done later (e.g. when we have something like the intent mechanism
that allows the distinction to made).
--
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: HTTPSession state, was: [jira] Commented: (TUSCANY-973) HttpSessionScopeContainer should use the HttpSession for session persistance
Posted by Jim Marino <jm...@myromatours.com>.
On Dec 6, 2006, at 10:04 AM, Jeremy Boynes wrote:
> On Dec 6, 2006, at 9:05 AM, Jim Marino (JIRA) wrote:
>
>> [ http://issues.apache.org/jira/browse/TUSCANY-973?
>> page=comments#action_12456118 ]
>>
>> Jim Marino commented on TUSCANY-973:
>> ------------------------------------
>>
>> This needs to implement semantics similar to conversational
>> persistence and not just use the ServletContext as a container for
>> replication to work properly. At a certain point, the servlet
>> engine needs to be notified of a series of changes through
>> setAttribute. This is the same pattern we have with conversational
>> scope. We should also have a mechanism based on intents that
>> specify whether a particular instance should failover, otherwise,
>> we don't need to store it in the Servlet context.
>
> I don't see this. The conversation scope here is the HTTP session
> and that is represented by the HTTPSession managed by the
> ServletContext. That seems an obvious place to be placing the state.
Yes that is exactly what I am saying. However, notification that
state has changed needs to be done similar to the way we are handling
conversation persistence. None of this would use the conversational
scope container.
>
> Intent is a separate issue and we don't even have basic support for
> that yet (or do we?). Even if we did we can map this to whether the
> servlet is <distributable> or not.
>
Servlet? Some components we may want fail-over for, some we may not.
We need a way to distinguish this.
> --
> Jeremy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
HTTPSession state, was: [jira] Commented: (TUSCANY-973) HttpSessionScopeContainer should use the HttpSession for session persistance
Posted by Jeremy Boynes <jb...@apache.org>.
On Dec 6, 2006, at 9:05 AM, Jim Marino (JIRA) wrote:
> [ http://issues.apache.org/jira/browse/TUSCANY-973?
> page=comments#action_12456118 ]
>
> Jim Marino commented on TUSCANY-973:
> ------------------------------------
>
> This needs to implement semantics similar to conversational
> persistence and not just use the ServletContext as a container for
> replication to work properly. At a certain point, the servlet
> engine needs to be notified of a series of changes through
> setAttribute. This is the same pattern we have with conversational
> scope. We should also have a mechanism based on intents that
> specify whether a particular instance should failover, otherwise,
> we don't need to store it in the Servlet context.
I don't see this. The conversation scope here is the HTTP session and
that is represented by the HTTPSession managed by the ServletContext.
That seems an obvious place to be placing the state.
Intent is a separate issue and we don't even have basic support for
that yet (or do we?). Even if we did we can map this to whether the
servlet is <distributable> or not.
--
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: [jira] Commented: (TUSCANY-973) HttpSessionScopeContainer should use the HttpSession for session persistance
Posted by Jim Marino <jm...@myromatours.com>.
On Dec 19, 2006, at 9:31 AM, ant elder wrote:
> Was there any consensus reach on what to do for this? There was a
> few emails
> about it, the last one:
>
> http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200612.mbox/
> %3c3770E0BF-BA9B-41CC-A554-7D42A365DBF1@myromatours.com%3e
>
> It wasn't very clear to me what the "resetting the object into the
> servlet
> context if state change occurs on a session-scoped object" was about?
>
Jeremy and I were saying the same thing: session scope should rely on
the underlying servlet context. My additional point was this entails
making sure the servlet engine is properly notified of changes to any
instances. Any web application needs to do this and it is something
we will need to handle transparent to application code. My suggestion
would be to do something similar to how we are handling
conversational code (i.e. update on a certain boundary, perhaps the
invocation).
Jim
> ...ant
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: [jira] Commented: (TUSCANY-973) HttpSessionScopeContainer should use the HttpSession for session persistance
Posted by ant elder <an...@gmail.com>.
Was there any consensus reach on what to do for this? There was a few emails
about it, the last one:
http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200612.mbox/%3c3770E0BF-BA9B-41CC-A554-7D42A365DBF1@myromatours.com%3e
It wasn't very clear to me what the "resetting the object into the servlet
context if state change occurs on a session-scoped object" was about?
...ant
On 12/6/06, Jim Marino (JIRA) <tu...@ws.apache.org> wrote:
>
> [
> http://issues.apache.org/jira/browse/TUSCANY-973?page=comments#action_12456118]
>
> Jim Marino commented on TUSCANY-973:
> ------------------------------------
>
> This needs to implement semantics similar to conversational persistence
> and not just use the ServletContext as a container for replication to work
> properly. At a certain point, the servlet engine needs to be notified of a
> series of changes through setAttribute. This is the same pattern we have
> with conversational scope. We should also have a mechanism based on intents
> that specify whether a particular instance should failover, otherwise, we
> don't need to store it in the Servlet context.
>
> > HttpSessionScopeContainer should use the HttpSession for session
> persistance
> >
> ----------------------------------------------------------------------------
> >
> > Key: TUSCANY-973
> > URL: http://issues.apache.org/jira/browse/TUSCANY-973
> > Project: Tuscany
> > Issue Type: Bug
> > Components: Java SCA Core
> > Affects Versions: Java-M2
> > Reporter: ant elder
> > Assigned To: ant elder
> > Fix For: Java-Mx
> >
> >
> > The HttpSessionScopeContainer should use the HttpSession for session
> persistance instead of the HashMap it currently uses
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>