[Zope3-checkins] CVS: Zope3/src/zope/app - _app.py:1.12
Fred L. Drake, Jr.
fred@zope.com
Thu, 26 Jun 2003 10:42:34 -0400
Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv20230
Modified Files:
_app.py
Log Message:
Use the new IDatabaseOpenedEvent to allow services to register
themselves.
=== Zope3/src/zope/app/_app.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/_app.py:1.11 Thu May 22 09:58:52 2003
+++ Zope3/src/zope/app/_app.py Thu Jun 26 10:42:34 2003
@@ -67,11 +67,10 @@
storage = FileStorage(db)
db = DB(storage, cache_size=4000)
- # XXX When bootstrapping a new database, the following will fail
- # while trying to add services when no config_file was passed
- # to Application() below. So, don't do that. :-)
- from zope.app.startup import bootstrap
- bootstrap.bootstrapInstance(db)
+ # The following will fail unless the application has been configured.
+ from zope.app.process import event
+ from zope.app.event import publish
+ publish(None, event.DatabaseOpened(db))
return db