Module server |
[hide private]
[frames] | no frames]

## Source Code for Module server

     1
     2  from c3errors import ConfigFileException
     3  from baseObjects import Server, Database
     4  from xml.dom import Node
     5  from configParser import C3Object
     6
     7 -class SimpleServer(Server):
     8      databases = {}
     9
    10 -    def __init__(self, session, configFile="serverConfig.xml"):
    11          self.databaseConfigs = {}
    12          self.databases = {}
    13          self.id = "DefaultServer"
    14          session.server = self
    15
    16          # Bootstrappage
    17          dom = self._getDomFromFile(session, configFile)
    18          topNode = dom.childNodes[0]
    19          C3Object.__init__(self, session, topNode, None)
    20
    21 -    def _cacheDatabases(self, session):
    22          for dbid in self.databaseConfigs.keys():
    23              db = self.get_object(session, dbid)
    24              self.databases[dbid] = db
    25