home contents changes options help subscribe edit (external edit)

A ZopeProduct which contains this file (usually empty) will have a "Refresh" tab in the ZMI at /Control_Panel/Products/productname. You can use this to install updated product code from the filesystem without having to do a complete zope restart.

It can be useful during development, but be warned that use of refresh can cause memory leaks and/or obscure problems later on, causing you to waste time. When you remember this warning, do a full restart to make such problems go away.

Some discussion:

From: Shane Hathaway
To: Lennart Regebro
Cc: Dieter Maurer, zope-dev
Subject: Re: [Zope-dev]? Re: [ZODB-Dev]? Reloading product in 2.8
Date: Mon, 18 Jul 2005 16:46:28 -0600

Lennart Regebro wrote:
> On 7/15/05, Shane Hathaway wrote:
>>Indeed, it does work for some people, but I've personally witnessed some
>>very intelligent folks spending hours on problems created by misuse of
>>Refresh. Maybe this is attributable to documentation.
>
> could be, because i have now, for several years constantly heard th
> statement that it works if used correclt, but nobody can tell me what
> correctly is... Hence, for me it has been useless even since it became
> part of core.

I think there is documentation inside Zope, but if there isn't, here's a
start.

1. If no other product depends on the product you're refreshing, and
your product does not register itself with another product, you can
refresh your product without setting up dependencies. Refresh was
designed for this case.

2. If you want to refresh a base product like CMFCore, you have to
enable refresh for CMFCore and all products that depend on it, even
indirectly. Then you have to set up all dependencies manually, using
the refresh forms in the control panel.

3. If you want to refresh a product that registers itself with another
product, you have to set up dependencies like in step #2. When you want
to refresh, you have to refresh the product that contains the registry,
not your own product. Otherwise the registry will refer to instances of
the old product classes.

The main symptom of an incomplete refresh is a global variable
inexplicably bound to None. When Python reloads a module, it binds all
global variables in the old module to None. Refresh tries to clear all
references to the old module, but it can't see inter-product registries.
Therefore, a global variable set to None means the refresh operation
was not complete, but Refresh doesn't know it.



subject:
  ( 23 subscribers )