summaryrefslogtreecommitdiffstats
path: root/base/server/cmscore/src/com/netscape/cmscore/dbs/CertRecord.java
Commit message (Collapse)AuthorAgeFilesLines
* Reorganized server packages.Endi S. Dewata2013-10-251-0/+283
The tomcat, cms, and cmscore packages have been moved from base/common into separate folders in base/server so that they can be built separately.
.info('Created connection context.%s' % self.name) def create_connection(self, *args, **kw): raise NotImplementedError('%s.create_connection()' % self.name) def disconnect(self): if not hasattr(context, self.name): raise StandardError( "disconnect: 'context.%s' does not exist in thread %r" % ( self.name, threading.currentThread().getName() ) ) self.destroy_connection() self.info('Destroyed connection context.%s' % self.name) def destroy_connection(self): raise NotImplementedError('%s.destroy_connection()' % self.name) def isconnected(self): """ Return ``True`` if thread-local connection on `request.context` exists. """ return hasattr(context, self.name) def __get_conn(self): """ Return thread-local connection. """ if not hasattr(context, self.name): raise AttributeError('no context.%s in thread %r' % ( self.name, threading.currentThread().getName()) ) return getattr(context, self.name).conn conn = property(__get_conn) class Executioner(Backend): def create_context(self, ccache=None, client_ip=None): if self.env.in_server: if self.api.env.use_ldap2: self.Backend.ldap2.connect(ccache=ccache) else: self.Backend.ldap.connect(ccache) else: self.Backend.xmlclient.connect() def execute(self, _name, *args, **options): error = None try: if _name not in self.Command: raise CommandError(name=_name) result = self.Command[_name](*args, **options) except PublicError, e: error = e except StandardError, e: self.exception( 'non-public: %s: %s', e.__class__.__name__, str(e) ) error = InternalError() destroy_context() if error is None: return result assert isinstance(error, PublicError) raise error