[opencms-dev] How to re-initialze the app after DB replication (without app context restart)

Florian Hopf hopf at synyx.de
Mon Oct 24 07:31:16 CEST 2011


Hi Mathias,

Am 24.10.2011 04:17, schrieb Mathias Lin:
> 
> I have two OpenCms servers A and server B and replicating the DB from server
> A to server B while servers are running. While all DB tables are identical,
> server B sometimes doesn't show content resources (i.e. structured content
> files in the workplace, in the frontend) that should be there actually,
> until I restart the app context.
> Seems that some caching or locks in the ORM layer are still in place.
> I was hoping to be able to re-initialize the content delivery mechanism
> somehow via the cmsshell, but couldn't find any suitable command.
> 
> Is there any way to 'refresh' and force server B to display the correct
> resources as they have been replicated to it's database without having to
> restart the app context?
> 

You might try the event EVENT_CLEAR_CACHES, something like this:

OpenCms.fireCmsEvent(I_CmsEventListener.EVENT_CLEAR_CACHES, new HashMap())

I haven't done this myself but it looks promising.

Regards
Florian



More information about the opencms-dev mailing list