[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
sessions are not shared in Terracotta  XML
Forum Index -> Terracotta for Web Sessions
Author Message
mtking

neo

Joined: 05/30/2012 00:38:38
Messages: 2
Offline

I used two client hosts with Ubuntu 11 box. Each has installed Tomcat 7 as application server. Under them, there are several application. I'd like one of them to share one session.

By following the offical docs. http://terracotta.org/documentation/web-sessions/installation-guide

I installed terracotta 3.6.2 on the third host. Then configed the two Tomcat 7 context.xml by adding
<Valve className="org.terracotta.session.TerracottaTomcat70xSessionValve" tcConfigUrl="myterracottaIP:9510"/>

I created one test.jps to print session id and copied them to the ROOT floder of Tomcat servers.

After run terracotta server and tomcat servers, everything looks fine. In Develop Console, I have seen two clients connected to terracotta server and sessions in Session section. But when I browse the test.jps under each tomcat server, them print different session id. And also, in other appliations, there is no session got shared. Every application in each Tomcat use its own session.

Is there any configuraion I have missed? Or there should be merely one appliaction within Tomcat? Otherwise, Terracotta would not know which session should be shared?

I used default terracotta installation, I did not find any tc-config.xml within the installation directory. So, by default, Terracotta uses its built-in configuration? And if I need to change the configuration, I will need to create tc-config.xml from scratch?

Thanks in avdance. These issues have been baffling me for few days.

rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1491
Offline

Hi,

Different applications in same tomcat will always have different session Id. However as you say you have placed test.jps in Root of two Tomcats and configured it with terracotta still you are getting different session Id. This may be due to some configuration issue.

Have you configured the context.xml for each Tomcat with "valve" with there IP for tc-config respectively. For ex :

For Tomcat1
<Context>
<Valve className="org.terracotta.session.TerracottaTomcat70xSessionValve" tcConfigUrl="Tomcat1 IP:9510"/>
</Context>

For Tomcat 2
<Context>
<Valve className="org.terracotta.session.TerracottaTomcat70xSessionValve" tcConfigUrl="Tomcat2IP:9510"/>
</Context>



You don't need to make any changes to tc-config.xml for this.

Rakesh Joshi
Senior Consultant
Terracotta.
 
Forum Index -> Terracotta for Web Sessions
Go to:   
Powered by JForum 2.1.7 © JForum Team