I didn't know that either.  It is simply a case of looking for the wrong
keywords.  I said application score replication they said context attribute
replication.  I gotta learn how to speak their language.

Even after I put
<Context className="*org.apache.catalina.ha.context.ReplicatedContext*">
in my context.xml

and make sure that my application's web.xml has
*<distributable />*
*
*
the following:

   1. Map<String, Date> userCache = (Map<String, Date>)
   context.getAttribute("userCache");
   2. userCache.remove(remoteUserName);

returns a null userCache object (context is set in the ServletContextAware
method, setServletContext).  When I enumerate through all the context
attributes, I cannot see the stuff I am putting in it, just like the
default entries which wind up there.  Too weird.

-Greg

On Thu, Feb 16, 2012 at 9:59 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chuck,
>
> On 2/15/12 4:21 PM, Caldarale, Charles R wrote:
> >> From: Gregory Werner [mailto:grjas...@gmail.com] Subject: Re:
> >> Application Scope Replication in 6.0.x
> >
> >> Common data definitions which are used over and over and over
> >> again and don't change.  After the first time they are loaded, I
> >> want the info to be remembered for all users to access until
> >> Tomcat is brought down again.
> >
> > So why don't you do that in a ServletContextListener?
>
> +1
>
> If you need data available to the context, I would argue that it is
> more efficient to load and manage it locally than to replicate it
> across a cluster.
>
> Then again, I don't like clustering in the first place.
>
> (Sorry for pointing you in the wrong direction earlier).
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk89GeMACgkQ9CaO5/Lv0PBjWwCcDavF339v1cAhCrw0XKbr39Y9
> 1kMAniUurW8Sz3M4Xb/Q9c77fUszkIFI
> =OCY1
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to