One Wiki running on n Tomcats w/ Oracle (where n>1)

Hi all

Today, I came across something that doesn’t really make sense to me. We have multiple physical machines here, each of which has its own tomcat running. Think of it as load balancer setup (although we’re not there yet).

XWiki is deployed within each container; each deployment pointing to the same Oracle database. I checked like 20 times, all the JDBC urls are exactly the same. On the other hand, they do not share the same environment.permanentDirectory. Everything is configured to be stored in the database, with as little as possible to be put into the filesystem.

I would now expect that when I edit a page on host A, the change would immediately be visible on host B. Short: It’s not.

What I would like to know before I start afresh, flush the database and remove the whole permanent directory: Am I expecting something impossible?

If you guys say “that should work”, I’ll dig deeper into it with a clean installation.

Thanks in advance

André

Have you configured your XWiki instances to communicate with each others as described in https://extensions.xwiki.org/xwiki/bin/view/Extension/Observation%20Module%20Remote ?

Without that instance B have no idea the document has been modified in the database so it return what’s in the cache (the last version of the document which was loaded in this instance).

1 Like

Hi Thomas

Thanks for the quick reply. No, it’s actually the first time I heard of this. I expected something like records not being commited (there’s an autoCommit option in hibernate.cfg somewhere).

I’ll have a look.

Cheers

André

See also https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Clustering/

1 Like

Halleluja!

Thanks guys! I tested this on two servers and it seems to work perfectly fine!

What two lines of configuration can change … :slight_smile:

Cheers

André