[From nobody Wed Jan 10 13:23:09 2007 Return-path: <zope-dev-bounces@zope.org> Envelope-to: chris@simplistix.co.uk Delivery-date: Wed, 10 Jan 2007 09:01:04 +0000 Received: from cvs.zope.org ([63.240.213.173] helo=mail.zope.org) by server1.simplistix.co.uk with esmtp (Exim 3.35 #1 (Debian)) id 1H4ZKS-0004QL-00 for <chris@simplistix.co.uk>; Wed, 10 Jan 2007 09:01:04 +0000 Received: from cvs.zope.org (localhost.localdomain [127.0.0.1]) by mail.zope.org (Postfix) with ESMTP id 44938203AE3; Wed, 10 Jan 2007 04:00:56 -0500 (EST) X-Original-To: zope-dev@zope.org Delivered-To: zope-dev@zope.org Received: from telegrafix.redmark.de (telegrafix.redmark.de [213.164.69.229]) by mail.zope.org (Postfix) with ESMTP id 820DF2033D4; Wed, 10 Jan 2007 04:00:54 -0500 (EST) Received: from biggeek (biggeek.haufe.de [10.11.1.45]) by telegrafix.redmark.de (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id l0A90rLA024764; Wed, 10 Jan 2007 10:00:53 +0100 Received: from dmaurer.haufe.de ([10.19.223.21] helo=newdm.local) by biggeek with esmtp (Exim 3.35 #1 (Debian)) id 1H4ZKH-0005JT-00; Wed, 10 Jan 2007 10:00:53 +0100 Received: (from dieter@localhost) by newdm.local (8.13.7/8.13.7) id l0A91NnO001866; Wed, 10 Jan 2007 10:01:23 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17828.43875.235157.62103@gargle.gargle.HOWL> Date: Wed, 10 Jan 2007 10:01:23 +0100 From: "Dieter Maurer" <dieter@handshake.de> To: zope@zope.org, zope-dev@zope.org X-Mailer: VM 7.04 under 21.4 (patch 8) "Honest Recruiter" XEmacs Lucid Cc: Subject: [Zope-dev] [Warning] Zope 3 component architecture (CA) not reliably usable for registrations from Python X-BeenThere: zope-dev@zope.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: zope-dev@zope.org List-Id: Developers of the Z Object Publishing Environment <zope-dev.zope.org> List-Unsubscribe: <http://mail.zope.org/mailman/listinfo/zope-dev>, <mailto:zope-dev-request@zope.org?subject=unsubscribe> List-Archive: <http://mail.zope.org/pipermail/zope-dev> List-Post: <mailto:zope-dev@zope.org> List-Help: <mailto:zope-dev-request@zope.org?subject=help> List-Subscribe: <http://mail.zope.org/mailman/listinfo/zope-dev>, <mailto:zope-dev-request@zope.org?subject=subscribe> Sender: zope-dev-bounces@zope.org Errors-To: zope-dev-bounces@zope.org X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on server1.simplistix.co.uk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.3 I tried to use Zope3 events to get informed when requests start and end. One of our modules (the interface module to "jpype") requires such a notification for reliable work. Therefore, it tried to register the corresponding subscriptions on import of this module. Unfortunately, this works very unreliably -- for the following reasons: The CA performs by itself only extremely minimal initialization. Especially, it does not register the "Adapters" service, necessary for the registration of event subscriptions. The full CA initialization is only performed quite late, in the call to "Products.Five.initialize". Event notification registration attempts before this time will fail (with a "ComponentLookupError: 'Adapters'"), those performed after this time will succeed. The "Five" initialization is stupid enough that it will fail when the service registration for 'Adapters' has already been performed. At the current state, event notifications can reliably only be defined via ZCML. This is unfortunate for our use case where the registration should be bound to the import of a given module. -- Dieter _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ]