• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Tomcat replication question

 
Greenhorn
Posts: 5
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,

I'm trying to setup Tomcat context replication which 3 tomcat nodes and an Apache loadbalancer

I've changed context.xml on each Tomcat instance to

<Context distributable="true" className="org.apache.catalina.ha.context.ReplicatedContext" >

And added the <distributable/> tag to web.xml

I've written a context listener to test if the replication worked



When I look at the Tomcat logs it seems that replication is setup correctly

[Tomcat A]
INFO: Deploying web application directory ContextSharing
25-jan-2011 9:51:33 org.apache.catalina.ha.session.DeltaManager start
INFO: Register manager /ContextSharing to cluster element Engine with name Catal
ina
25-jan-2011 9:51:33 org.apache.catalina.ha.session.DeltaManager start
INFO: Starting clustering manager at /ContextSharing
25-jan-2011 9:51:33 org.apache.catalina.ha.session.DeltaManager getAllClusterSes
sions
INFO: Manager [localhost#/ContextSharing]: skipping state transfer. No members a
ctive in cluster group. -> First tomcat to start, so no members exists
Context init -> Initial context startup, this is okay
init storage
SharedStorage init
Context init end


Everything seems okay

[Tomcat B]
INFO: Starting clustering manager at /ContextSharing
25-jan-2011 9:52:25 org.apache.catalina.ha.session.DeltaManager getAllClusterSes
sions
WARNING: Manager [localhost#/ContextSharing], requesting session state from org.
apache.catalina.tribes.membership.MemberImpl[tcp://{192, 168, 1, 113}:4000,{192,
168, 1, 113},4000, alive=54015,id={-72 113 40 -25 -51 -71 73 -49 -120 -108 47 8
6 82 -9 53 -17 }, payload={}, command={}, domain={}, ]. This operation will time
out if no session state has been received within 60 seconds.
25-jan-2011 9:52:25 org.apache.catalina.ha.session.DeltaManager waitForSendAllSe
ssions
INFO: Manager [localhost#/ContextSharing]; session state send at 25-1-11 9:52 re
ceived in 109 ms.
Context init
init storage -> What's this?! This should have been done already by Tomcat A
SharedStorage init
Context init end
 
Jeroen Meijer
Greenhorn
Posts: 5
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What am I missing?
 
Saloon Keeper
Posts: 23285
158
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure that's a problem? If I have 3 program using shared storage and I'm not meticulous about my wording, I might use the work "init" to mean "setting up for and connecting to shared storage" as opposed to "setting up and formatting shared storage".
 
Jeroen Meijer
Greenhorn
Posts: 5
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
??
I'm sorry for my English as it is not my native language.

I solved the problem: I forgot to implement Serializable
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to ask you which tomcat version are you using? and what exactly was the error? i know that it was serializable but where it needs to be added?
 
Watchya got in that poodle gun? Anything for me? Or this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic