You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Joakim Ahlén <jo...@kartena.se> on 2005/04/22 14:54:02 UTC

Clustering "application scope replication"

Hi!

We have a cluster of two tomcat 5.5.9-machines using session replication. However, we also have data in application scope (set with getServletContext().setAttribute(...)) which as far as i have found in the docs, is not replicated.

Is there any way to accomplish this with tomcat? If not, is there any plan to develop support for it? Do other application servers have support for this?

Hope you can help me.

Regards

Joakim

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Clustering "application scope replication"

Posted by Peter Rossbach <pr...@objektpark.de>.
I hope you have download and use my cluster patches for 5.5.9

http://issues.apache.org/bugzilla/show_bug.cgi?id=34389

when you implement the feature ServletContext attribute replication feature
I support you. ( s. other mail)

Peter

Joakim Ahlén schrieb:

>Hi!
>
>We have a cluster of two tomcat 5.5.9-machines using session replication. However, we also have data in application scope (set with getServletContext().setAttribute(...)) which as far as i have found in the docs, is not replicated.
>
>Is there any way to accomplish this with tomcat? If not, is there any plan to develop support for it? Do other application servers have support for this?
>
>Hope you can help me.
>
>Regards
>
>Joakim
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>  
>





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Clustering "application scope replication"

Posted by Peter Rossbach <pr...@objektpark.de>.
Hey,

with the next tomcat 5.5.10 release you can add a ClusterListener and 
LifecycleListener to
your cluster config to realize those ServletContext attributes 
replication things. Look at the current cvs head
and test it.

    <ClusterListener 
className="org.apache.catalina.cluster.session.ClusterSessionListener" />
    <ClusterListener className="your class" />
    <Listener className="your class" />

Your LifecycleListener receive the manager/context un/registration event.
BEFORE_MANAGERREGISTER_EVENT
AFTER_MANAGERREGISTER_EVENT
BEFORE_MANAGERUNREGISTER_EVENT
AFTER_MANAGERUNREGISTER_EVENT

ClusterListener are receive the messages. (look at 
ClusterSessionListener or JvmRouteSessionIDBinderListener)  
You must define your own ClusterMessage implementation 
(SessionMessageImpl or SessionIDMessage)

Your code contribution is very welcome :-)

Peter

Will Hartung schrieb:

>>From: "Joakim Ahlén" <jo...@kartena.se>
>>Sent: Friday, April 22, 2005 5:54 AM
>>    
>>
>
>  
>
>>Hi!
>>
>>We have a cluster of two tomcat 5.5.9-machines using session
>>replication. However, we also have data in application scope (set with
>>getServletContext().setAttribute(...)) which as far as i have found in
>>the docs, is not replicated.
>>    
>>
>
>You need a cluster aware caching solution. Session replication is more for
>failover and such.
>
>Look at something like OSCache and its ilk to get the functionality that you
>need.
>
>Regards,
>
>Will Hartung
>(willh@msoft.com)
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Clustering "application scope replication"

Posted by Will Hartung <wi...@msoft.com>.
> From: "Joakim Ahlén" <jo...@kartena.se>
> Sent: Friday, April 22, 2005 5:54 AM

> Hi!
>
> We have a cluster of two tomcat 5.5.9-machines using session
> replication. However, we also have data in application scope (set with
> getServletContext().setAttribute(...)) which as far as i have found in
> the docs, is not replicated.

You need a cluster aware caching solution. Session replication is more for
failover and such.

Look at something like OSCache and its ilk to get the functionality that you
need.

Regards,

Will Hartung
(willh@msoft.com)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Clustering "application scope replication"

Posted by "J. Ryan Earl" <ry...@dynaconnections.com>.
Let me rephrase the question, how does Tomcat determine what is a session
attribute.  What if there are classes that implement java.io.Serializable
that have nothing to do with "session attributes?"

-ryan

-----Original Message-----
From: J. Ryan Earl [mailto:ryan@dynaconnections.com]
Sent: Friday, April 22, 2005 10:19 AM
To: Lionel Farbos; Tomcat Users List
Subject: RE: Clustering "application scope replication"


I've read that document many times, and that does not answer my question.

-ryan

-----Original Message-----
From: Lionel Farbos [mailto:lionel.farbos@free.fr]
Sent: Friday, April 22, 2005 9:50 AM
To: Tomcat Users List
Cc: ryan@dynaconnections.com
Subject: Re: Clustering "application scope replication"


As it is explained in the doc :
"All your session attributes must implement java.io.Serializable"

On Fri, 22 Apr 2005 09:44:01 -0500
"J. Ryan Earl" <ry...@dynaconnections.com> wrote:

> How does Tomcat know what to serialize?  Does it just use the Reflection
> package and serialize out -everything- that implements
java.io.Serializable?
>
> -ryan
>
> -----Original Message-----
> From: Lionel Farbos [mailto:lionel.farbos@free.fr]
> Sent: Friday, April 22, 2005 9:11 AM
> To: Tomcat Users List
> Cc: joakim.ahlen@kartena.se
> Subject: Re: Clustering "application scope replication"
>
>
> Hi
>
> For your needs, you can use
> session replication
> (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html)
> or
> your own mechanisms and tables with datas in a database ...
> Regards.
>
> On Fri, 22 Apr 2005 15:15:54 +0200
> "Joakim Ahlén" <jo...@kartena.se> wrote:
>
> > Ok, too bad. Is there any way of storing objects if we want them in
> "cluster scope"?
> >
> > An ugly hack would be to use one single HttpSession with a special
> session-id to store global objects, and somehow fetch objects from within
> this HttpSession from inside requests that belongs to other sessions. I
> can't see how this could be done though, since request.getSession() can't
> fetch other sessions than its own. This would probably also have to
include
> some tomcat specific magic which i wouldn't want.
> >
> > Any help is appreciated on how to handle this problem!
> >
> > Thanks
> >
> > Joakim
> >
> > On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote:
> > > The servlet spec says this data is local to a given JVM.
> > >
> > > I suppose a servlet engine could expand beyond the spec, but I'd be
> > > surprised if Tomcat did here.
> > >
> > > Joakim Ahlén wrote:
> > >
> > > >Hi!
> > > >
> > > >We have a cluster of two tomcat 5.5.9-machines using session
> replication.
> > > >However, we also have data in application scope (set with
> > > >getServletContext().setAttribute(...)) which as far as i have found
in
> the
> > > >docs, is not replicated.
> > > >
> > > >Is there any way to accomplish this with tomcat? If not, is there any
> plan
> > > >to develop support for it? Do other application servers have support
> for
> > > >this?
> > > >
> > > >Hope you can help me.
> > > >
> > > >Regards
> > > >
> > > >Joakim
> > > >
> > > >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Clustering "application scope replication"

Posted by "J. Ryan Earl" <ry...@dynaconnections.com>.
I've read that document many times, and that does not answer my question.

-ryan

-----Original Message-----
From: Lionel Farbos [mailto:lionel.farbos@free.fr]
Sent: Friday, April 22, 2005 9:50 AM
To: Tomcat Users List
Cc: ryan@dynaconnections.com
Subject: Re: Clustering "application scope replication"


As it is explained in the doc :
"All your session attributes must implement java.io.Serializable"

On Fri, 22 Apr 2005 09:44:01 -0500
"J. Ryan Earl" <ry...@dynaconnections.com> wrote:

> How does Tomcat know what to serialize?  Does it just use the Reflection
> package and serialize out -everything- that implements
java.io.Serializable?
>
> -ryan
>
> -----Original Message-----
> From: Lionel Farbos [mailto:lionel.farbos@free.fr]
> Sent: Friday, April 22, 2005 9:11 AM
> To: Tomcat Users List
> Cc: joakim.ahlen@kartena.se
> Subject: Re: Clustering "application scope replication"
>
>
> Hi
>
> For your needs, you can use
> session replication
> (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html)
> or
> your own mechanisms and tables with datas in a database ...
> Regards.
>
> On Fri, 22 Apr 2005 15:15:54 +0200
> "Joakim Ahlén" <jo...@kartena.se> wrote:
>
> > Ok, too bad. Is there any way of storing objects if we want them in
> "cluster scope"?
> >
> > An ugly hack would be to use one single HttpSession with a special
> session-id to store global objects, and somehow fetch objects from within
> this HttpSession from inside requests that belongs to other sessions. I
> can't see how this could be done though, since request.getSession() can't
> fetch other sessions than its own. This would probably also have to
include
> some tomcat specific magic which i wouldn't want.
> >
> > Any help is appreciated on how to handle this problem!
> >
> > Thanks
> >
> > Joakim
> >
> > On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote:
> > > The servlet spec says this data is local to a given JVM.
> > >
> > > I suppose a servlet engine could expand beyond the spec, but I'd be
> > > surprised if Tomcat did here.
> > >
> > > Joakim Ahlén wrote:
> > >
> > > >Hi!
> > > >
> > > >We have a cluster of two tomcat 5.5.9-machines using session
> replication.
> > > >However, we also have data in application scope (set with
> > > >getServletContext().setAttribute(...)) which as far as i have found
in
> the
> > > >docs, is not replicated.
> > > >
> > > >Is there any way to accomplish this with tomcat? If not, is there any
> plan
> > > >to develop support for it? Do other application servers have support
> for
> > > >this?
> > > >
> > > >Hope you can help me.
> > > >
> > > >Regards
> > > >
> > > >Joakim
> > > >
> > > >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Clustering "application scope replication"

Posted by Lionel Farbos <li...@free.fr>.
As it is explained in the doc :
"All your session attributes must implement java.io.Serializable"

On Fri, 22 Apr 2005 09:44:01 -0500
"J. Ryan Earl" <ry...@dynaconnections.com> wrote:

> How does Tomcat know what to serialize?  Does it just use the Reflection
> package and serialize out -everything- that implements java.io.Serializable?
> 
> -ryan
> 
> -----Original Message-----
> From: Lionel Farbos [mailto:lionel.farbos@free.fr]
> Sent: Friday, April 22, 2005 9:11 AM
> To: Tomcat Users List
> Cc: joakim.ahlen@kartena.se
> Subject: Re: Clustering "application scope replication"
> 
> 
> Hi
> 
> For your needs, you can use
> session replication
> (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html)
> or
> your own mechanisms and tables with datas in a database ...
> Regards.
> 
> On Fri, 22 Apr 2005 15:15:54 +0200
> "Joakim Ahlén" <jo...@kartena.se> wrote:
> 
> > Ok, too bad. Is there any way of storing objects if we want them in
> "cluster scope"?
> >
> > An ugly hack would be to use one single HttpSession with a special
> session-id to store global objects, and somehow fetch objects from within
> this HttpSession from inside requests that belongs to other sessions. I
> can't see how this could be done though, since request.getSession() can't
> fetch other sessions than its own. This would probably also have to include
> some tomcat specific magic which i wouldn't want.
> >
> > Any help is appreciated on how to handle this problem!
> >
> > Thanks
> >
> > Joakim
> >
> > On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote:
> > > The servlet spec says this data is local to a given JVM.
> > >
> > > I suppose a servlet engine could expand beyond the spec, but I'd be
> > > surprised if Tomcat did here.
> > >
> > > Joakim Ahlén wrote:
> > >
> > > >Hi!
> > > >
> > > >We have a cluster of two tomcat 5.5.9-machines using session
> replication.
> > > >However, we also have data in application scope (set with
> > > >getServletContext().setAttribute(...)) which as far as i have found in
> the
> > > >docs, is not replicated.
> > > >
> > > >Is there any way to accomplish this with tomcat? If not, is there any
> plan
> > > >to develop support for it? Do other application servers have support
> for
> > > >this?
> > > >
> > > >Hope you can help me.
> > > >
> > > >Regards
> > > >
> > > >Joakim
> > > >
> > > >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Clustering "application scope replication"

Posted by Will Hartung <wi...@msoft.com>.
> From: "J. Ryan Earl" <ry...@dynaconnections.com>
> Sent: Friday, April 22, 2005 7:44 AM

> How does Tomcat know what to serialize?  Does it just use the Reflection
> package and serialize out -everything- that implements
java.io.Serializable?

When you do a "setAttribute(key, object)", it serializes the object out for
replication, so, both your key and object needs to be serializable. It uses
the generic Java writeObject method.

This is why you need to use setAttribute to ensure your changes are
replicated, and why you can not just change an object directly and expect it
to be replicated.

So, if you are storing, say, a long ArrayList of objects in your session
(like, say, query results), you must use setAttribute(yourList) each time
you make a change to anything in the list, and then it serializes the ENTIRE
list for replication, not just your changes. (And thus we see some of the
limits of replication, at least some of the things you need to be aware of.)

Regards,

Will Hartung
(willh@msoft.com)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Clustering "application scope replication"

Posted by "J. Ryan Earl" <ry...@dynaconnections.com>.
How does Tomcat know what to serialize?  Does it just use the Reflection
package and serialize out -everything- that implements java.io.Serializable?

-ryan

-----Original Message-----
From: Lionel Farbos [mailto:lionel.farbos@free.fr]
Sent: Friday, April 22, 2005 9:11 AM
To: Tomcat Users List
Cc: joakim.ahlen@kartena.se
Subject: Re: Clustering "application scope replication"


Hi

For your needs, you can use
session replication
(http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html)
or
your own mechanisms and tables with datas in a database ...
Regards.

On Fri, 22 Apr 2005 15:15:54 +0200
"Joakim Ahlén" <jo...@kartena.se> wrote:

> Ok, too bad. Is there any way of storing objects if we want them in
"cluster scope"?
>
> An ugly hack would be to use one single HttpSession with a special
session-id to store global objects, and somehow fetch objects from within
this HttpSession from inside requests that belongs to other sessions. I
can't see how this could be done though, since request.getSession() can't
fetch other sessions than its own. This would probably also have to include
some tomcat specific magic which i wouldn't want.
>
> Any help is appreciated on how to handle this problem!
>
> Thanks
>
> Joakim
>
> On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote:
> > The servlet spec says this data is local to a given JVM.
> >
> > I suppose a servlet engine could expand beyond the spec, but I'd be
> > surprised if Tomcat did here.
> >
> > Joakim Ahlén wrote:
> >
> > >Hi!
> > >
> > >We have a cluster of two tomcat 5.5.9-machines using session
replication.
> > >However, we also have data in application scope (set with
> > >getServletContext().setAttribute(...)) which as far as i have found in
the
> > >docs, is not replicated.
> > >
> > >Is there any way to accomplish this with tomcat? If not, is there any
plan
> > >to develop support for it? Do other application servers have support
for
> > >this?
> > >
> > >Hope you can help me.
> > >
> > >Regards
> > >
> > >Joakim
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Clustering "application scope replication"

Posted by Lionel Farbos <li...@free.fr>.
Hi

For your needs, you can use 
session replication (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/cluster-howto.html)
or 
your own mechanisms and tables with datas in a database ...
Regards.

On Fri, 22 Apr 2005 15:15:54 +0200
"Joakim Ahlén" <jo...@kartena.se> wrote:

> Ok, too bad. Is there any way of storing objects if we want them in "cluster scope"? 
> 
> An ugly hack would be to use one single HttpSession with a special session-id to store global objects, and somehow fetch objects from within this HttpSession from inside requests that belongs to other sessions. I can't see how this could be done though, since request.getSession() can't fetch other sessions than its own. This would probably also have to include some tomcat specific magic which i wouldn't want.
> 
> Any help is appreciated on how to handle this problem! 
> 
> Thanks
> 
> Joakim
> 
> On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote:
> > The servlet spec says this data is local to a given JVM.
> > 
> > I suppose a servlet engine could expand beyond the spec, but I'd be 
> > surprised if Tomcat did here.
> > 
> > Joakim Ahlén wrote:
> > 
> > >Hi!
> > >
> > >We have a cluster of two tomcat 5.5.9-machines using session replication. 
> > >However, we also have data in application scope (set with 
> > >getServletContext().setAttribute(...)) which as far as i have found in the 
> > >docs, is not replicated.
> > >
> > >Is there any way to accomplish this with tomcat? If not, is there any plan 
> > >to develop support for it? Do other application servers have support for 
> > >this?
> > >
> > >Hope you can help me.
> > >
> > >Regards
> > >
> > >Joakim
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > 
> > >
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Clustering "application scope replication"

Posted by Joakim Ahlén <jo...@kartena.se>.
Ok, too bad. Is there any way of storing objects if we want them in "cluster scope"? 

An ugly hack would be to use one single HttpSession with a special session-id to store global objects, and somehow fetch objects from within this HttpSession from inside requests that belongs to other sessions. I can't see how this could be done though, since request.getSession() can't fetch other sessions than its own. This would probably also have to include some tomcat specific magic which i wouldn't want.

Any help is appreciated on how to handle this problem! 

Thanks

Joakim

On Fri, Apr 22, 2005 at 08:07:21AM -0500, Jess Holle wrote:
> The servlet spec says this data is local to a given JVM.
> 
> I suppose a servlet engine could expand beyond the spec, but I'd be 
> surprised if Tomcat did here.
> 
> Joakim Ahlén wrote:
> 
> >Hi!
> >
> >We have a cluster of two tomcat 5.5.9-machines using session replication. 
> >However, we also have data in application scope (set with 
> >getServletContext().setAttribute(...)) which as far as i have found in the 
> >docs, is not replicated.
> >
> >Is there any way to accomplish this with tomcat? If not, is there any plan 
> >to develop support for it? Do other application servers have support for 
> >this?
> >
> >Hope you can help me.
> >
> >Regards
> >
> >Joakim
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Clustering "application scope replication"

Posted by Jess Holle <je...@ptc.com>.
The servlet spec says this data is local to a given JVM.

I suppose a servlet engine could expand beyond the spec, but I'd be 
surprised if Tomcat did here.

Joakim Ahlén wrote:

>Hi!
>
>We have a cluster of two tomcat 5.5.9-machines using session replication. However, we also have data in application scope (set with getServletContext().setAttribute(...)) which as far as i have found in the docs, is not replicated.
>
>Is there any way to accomplish this with tomcat? If not, is there any plan to develop support for it? Do other application servers have support for this?
>
>Hope you can help me.
>
>Regards
>
>Joakim
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org