-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

János,

On 4/11/2011 12:45 PM, János Löbb wrote:
> bml0066:local administrator$ ls -l tomcat1/conf/Catalina/localhost/
> bml0066:local administrator$ 
> 
> directory,  so I created a META-INF directory inside the examples directory 
> and placed a context.xml there

You have confused things: META-INF/context.xml goes into your WAR file
(or exploded WAR webapp directory). If you want to use
tomcat1/conf/Catalina/localhost/, you'll want the file to be called
tomcat1/conf/Catalina/localhost/examples.xml

> with the following content:
> 
> bml0066:local administrator$ cat 
> tomcat1/webapps/examples/META-INF/context.xml 
> <?xml version="1.0" encoding="UTF-8"?>
> <Context className="org.apache.catalina.ha.context.ReplicatedContext" 
> distributed="true" >
> </Context>

Specifying the "className" for the <Context> shouldn't be necessary.

There is no "distributed" attribute in the <Context> element.

You should be configuring <distributed/> in web.xml, not in context.xml.

http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html

> So the first question is, should I use the distributed="true" property here ? 
>  Is the book right ?

That book was published before TC 7 was available, so some things may
have changed.

> I think it is from 2007.  I already have the <distributable/> tag in the 
> webapp's web.xml.

That should be all you need, plus a <Cluster> configuration in
server.xml. Read the Cluster HOWTO document above.

> The second question is what to do to avoid the 404 message and fail the 
> session over instead of it, when I just stop the webapp on the tomcat 
> instance?  By default I am using sticky sessions.

<distributable> + clustering should result in session fail-over with our
without sticky sessions. One could argue that session session stickiness
is not necessary if you are fully replicating your sessions across the
cluster -- though you may have some transient state that needs to be
re-built on a fail-over target that might use more memory or resources
in which case stickiness is useful.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2jTdgACgkQ9CaO5/Lv0PAmUgCfVnrQRzku3/LzRoHNKYXYaUR1
DbYAnigFW9zo6QtGGlpC4KnIM5Nuz1Yq
=KkFg
-----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