Hi Alex, perhaps the fastest way is to modify jspwiki's own ehcache.xml file, building a differente war with different ehcache.xml setting up ehcache file for each instance.
ehcache reference can be found at https://www.ehcache.org/ehcache.xml, but perhaps following an example is easier. https://javaheap.wordpress.com/2011/07/22/distributed-ehcache-setup/ (although old) seems to be a good starting point HTH, juan pablo On Tue, Aug 17, 2021 at 10:08 AM Alex Rydzewski <arydzew...@elyland.net> wrote: > Kind times, Juan! > > Thanks for your explanations! > > In my case does not suppose to change wiki from external, if that may > say. I have two VMs with jspwiki and frontend nginx (with load balance > configuration) for reliability in cases when one instance will be > stopped. People which changes wiki pages do it on one of instance and my > problem is nothing changes on second without reload corresponding tomcat > context. > > I will try implement first variant from your suggestions. Any additional > information or ideas greatly appreciated. > > > On 2021/07/27 13:31:13, Juan Pablo Santos Rodríguez <j...@gmail.com> > wrote: > > Hi Alex,> > > > > apologies for the delayed response.> > > > > JSPWiki by default uses ehcache to request pages faster. If a page is> > > changed externally to JSPWiki, it won't be able to detect that a > change has> > > been made on that page, and won't see it until the cache expires.> > > > > Also, modifying a page externally to JSPWiki isn't usually a good idea,> > > when the new page content is picked up, the associated page metadata> > > changes (i.e., author) will be lost.> > > > > For this particular case though, given that you want to synchronize a > page> > > repository for 2 JSPWiki installations, I can think of the following > options> > > > > * configure ehcache so it runs on cluster, syncing both JSPWiki caches.> > > This is the most complex setup of all the options (requires some > presumably> > > complex ehcache configuration which I haven't looked into, it'll be> > > specific to your installation, you'll have to tweak JSPWiki's ehcache> > > configuration).> > > * deactivate the caching mechanism on both instances, or at least in > the> > > one which is being synced. Every time you hit JSPWiki you'll go to > disk (or> > > where your page provider uses), so it'll be slower than the first > case. How> > > slower will depend (again) on multiple factors and might be > reasonable to> > > you. You might gain the lost speed if you put a web server (Apache, > Nginx)> > > in front of JSPWiki to cache its requests.> > > * cron some JSPWiki restarts, purging cache data between shutdown and> > > start. Ugly, but it is another option too.> > > > > > > best regards,> > > juan pablo> > > > > El lun., 19 jul. 2021 11:11, Alex Rydzewski <ar...@elyland.net>> > > escribió:> > > > > > Kind times, jspwiki community!> > > >> > > > I have some trouble with next case...> > > >> > > > In my environment two virtual servers with tomcat9 and jspwiki has> > > > configured, which have ceph-fs shared the data directory. When any> > > > changes for jspwiki was did on one of the server, the changes applied> > > > only on that server.> > > >> > > > Tell me please, which is adecuate method for detect changes in data> > > > directory and apply them to jspwiki server.> > > >> > > > Thanks in advance.> > > >> > > > --> > > > З найкращими побажаннями, Олександр Ридзевський |With best regards, > Mr.> > > > Alexander Rydzewski, |С наилучшими пожеланиями, Александр Рыдзевский> > > > Системний та мережевий інженер, Elyland ltd. |System and Network> > > > Engineer at Elyland ltd. |Системный и сетевой инженер, Elyland ltd.> > > >> > > >> > > > > -- > З найкращими побажаннями, Олександр Ридзевський |With best regards, Mr. > Alexander Rydzewski, |С наилучшими пожеланиями, Александр Рыдзевский > Системний та мережевий інженер, Elyland ltd. |System and Network > Engineer at Elyland ltd. |Системный и сетевой инженер, Elyland ltd. > >