View of /PEAK/src/peak/peak.ini
Parent Directory
| Revision Log
Revision:
600 -
(
download)
Tue Nov 5 02:19:47 2002 UTC (21 years, 5 months ago) by
pje
File size: 2738 byte(s)
* Added 'binding.Constant(key, value)', which allows you to specify
a constant value to be used as a property or utility in that
component subtree.
* Added storage.get/begin/commit/abortTransaction() APIs for ease
of use in short scripts. Defined a default provider for
ITransactionService in peak.ini that provides each component root
with its own TransactionService instance. It's easily replaceable
with other allocation strategies, if it should be needed. I may
change this later to a per-root strategy, since the current strategy
requires creating localConfigs for each component root. We'll see
what actual use has to say about the best way of doing it.
* Fixed a problem with local/global config object startup that could
cause "phantom" configuration objects to appear via recursion of
getLocal() or getGlobal().
* Got rid of binding.meta.assertInterfaces, which is no longer needed
because the Interface package now correctly handles metaclass
instances.
* Got rid of Singleton, since it's not used for anything and I could
neither think of any use cases nor remember why I added it in the
first place!
* Made it possible for CachingProviders to cache per-localConfig as well
as per-object. This is handy for implementing per-hierarchy services,
like the TransactionService provider mentioned above.
* Misc. TODO updates.
[peak.config.loaders]
# This section defines the types of data that can be used in
# "[Load Settings From]" sections. Each entry is either the loading function
# to be used, or an import string specifying the loading function. Loading
# functions must conform to the 'config.ISettingLoader' interface.
file = "peak.config.config_components:loadConfigFile"
mapping = "peak.config.config_components:loadMapping"
[Load Settings From]
# "Load Settings From" sections are processed in-line to load settings from
# other sources. 'file=' entries act like "include" operations, loading
# configuration files in the same format. 'mapping=' entries load Python
# mapping objects. The first argument is the filename or mapping object,
# respectively, and the second argument, if present, is a prefix to be used
# on property names found in the specified mapping or file.
mapping = importString('os.environ'), 'environ.*'
[peak.naming.schemes]
# This section defines naming context factories or ParsedURL subclasses to
# be used for various URL schemes. The entry name is the URL scheme, and
# the value is either the object or an import string for loading it.
import = "peak.naming.factories.peak_imports:importURL"
smtp = "peak.naming.factories.smtp:smtpURL"
uuid = "peak.naming.factories.uuid:uuidURL"
ldap = "peak.storage.LDAP:ldapURL"
lockfile = "peak.running.lockfiles:lockfileURL"
nulllockfile= "peak.running.lockfiles:lockfileURL"
shlockfile = "peak.running.lockfiles:lockfileURL"
flockfile = "peak.running.lockfiles:lockfileURL"
winflockfile= "peak.running.lockfiles:lockfileURL"
[Provide Utilities]
# "Provide Utilities" sections define utilities by mapping from an import
# string for an interface, to an expression defining the Provider. In this
# case, we're defining a global default provider for the 'naming.IObjectFactory'
# interface, which "bottoms out" the search for object factories with the
# default behavior for creating an object from state found in a naming context.
# At some point, this section will also include setup for default transaction
# services, etc.
peak.naming.interfaces.IObjectFactory =
binding.Provider(
lambda forObj:
importString('peak.naming.spi')
)
# The following provider associates a default transaction service with the
# nearest localConfig above the object that the service is wanted for. It
# creates a TransactionService instance with that config as its parent
# component.
peak.storage.interfaces.ITransactionService =
binding.CachingProvider(
lambda foundIn:
importString('peak.storage.transactions.TransactionService')(
foundIn
),
local = True,
)