33 |
|
|
34 |
__all__ = ['Connection'] |
__all__ = ['Connection'] |
35 |
|
|
36 |
from gnue.common.datasources import GConditions, Exceptions |
from gnue.common.datasources import GDataObjects, GConditions |
37 |
from gnue.common.datasources.drivers.Base import Connection as BaseConnection |
from gnue.common.datasources.drivers.Base import Connection as BaseConnection |
38 |
from gnue.common.apps import GDebug |
from gnue.common.apps import GDebug |
39 |
from gnue.common.rpc import GComm |
from gnue.common.rpc import GComm |
49 |
from DataObject import DataObject |
from DataObject import DataObject |
50 |
from gnue.common.datasources.drivers.appserver.Schema.Discovery.Introspection import Introspection |
from gnue.common.datasources.drivers.appserver.Schema.Discovery.Introspection import Introspection |
51 |
|
|
52 |
|
|
53 |
|
# TODO: move all non standart Connection functions (request, ...) into a subobject native |
54 |
|
# to prevent namespace conflicts |
55 |
|
|
56 |
class Connection(BaseConnection): |
class Connection(BaseConnection): |
57 |
|
|
58 |
_DatabaseError = GComm.Error |
_DatabaseError = GComm.Error |
90 |
GDebug.printMesg(3,"Open Session ...") |
GDebug.printMesg(3,"Open Session ...") |
91 |
GDebug.printMesg(1,"Logging into appserver as user '%s'" % (user)) |
GDebug.printMesg(1,"Logging into appserver as user '%s'" % (user)) |
92 |
self._sess_id = self._sm.open({'user':user,'password':passwd}) |
self._sess_id = self._sm.open({'user':user,'password':passwd}) |
93 |
except Exception,msg: |
|
94 |
|
except Exception, msg: |
95 |
tmsg = _("Error loging into appserver: %s") % msg |
tmsg = _("Error loging into appserver: %s") % msg |
96 |
raise GDataObjects.ConnectionError, tmsg |
raise GDataObjects.ConnectionError, tmsg |
97 |
|
|