def with_transactional_resource(<EOL>transactional_resource_class,<EOL>resource_name,<EOL>reference_value_from=None<EOL>):
def class_decorator(cls):<EOL><INDENT>if not issubclass(cls, RequiredConfig):<EOL><INDENT>raise Exception(<EOL>'<STR_LIT>' % cls<EOL>)<EOL><DEDENT>new_req = cls.get_required_config()<EOL>new_req.namespace(resource_name)<EOL>new_req[resource_name].add_option(<EOL>'<STR_LIT>' % resource_name,<EOL>default=transactional_resource_class,<EOL>from_string_converter=class_converter,<EOL>reference_value_from=reference_value_from,<EOL>)<EOL>new_req[resource_name].add_option(<EOL>'<STR_LIT>' % resource_name,<EOL>default='<STR_LIT>',<EOL>doc='<STR_LIT>',<EOL>from_string_converter=class_converter,<EOL>reference_value_from=reference_value_from<EOL>)<EOL>cls.required_config = new_req<EOL>def new__init__(self, *args, **kwargs):<EOL><INDENT>super(cls, self).__init__(*args, **kwargs)<EOL>setattr(<EOL>self,<EOL>"<STR_LIT>" % resource_name,<EOL>self.config[resource_name]['<STR_LIT>' % resource_name](<EOL>self.config[resource_name]<EOL>)<EOL>)<EOL>setattr(<EOL>self,<EOL>"<STR_LIT>" % resource_name,<EOL>self.config[resource_name][<EOL>'<STR_LIT>' % resource_name<EOL>](<EOL>self.config[resource_name],<EOL>getattr(self, "<STR_LIT>" % resource_name)<EOL>)<EOL>)<EOL><DEDENT>if hasattr(cls, '<STR_LIT>'):<EOL><INDENT>original_init = cls.__init__<EOL>def both_inits(self, *args, **kwargs):<EOL><INDENT>new__init__(self, *args, **kwargs)<EOL>return original_init(self, *args, **kwargs)<EOL><DEDENT>cls.__init__ = both_inits<EOL><DEDENT>else:<EOL><INDENT>cls.__init__ = new__init__<EOL><DEDENT>return cls<EOL><DEDENT>return class_decorator<EOL>
a class decorator for Crontabber Apps.  This decorator will give access
    to a resource connection source.  Configuration will be automatically set
    up and the cron app can expect to have attributes:
        self.{resource_name}_connection_factory
        self.{resource_name}_transaction_executor
    available to use.
    Within the setup, the RequiredConfig structure gets set up like this:
        config.{resource_name}.{resource_name}_class = \
            transactional_resource_class
        config.{resource_name}.{resource_name}_transaction_executor_class = \
            'crontabber.transaction_executor.TransactionExecutor'

    parameters:
        transactional_resource_class - a string representing the full path of
            the class that represents a connection to the resource.  An example
            is "crontabber.connection_factory.ConnectionFactory".
        resource_name - a string that will serve as an identifier for this
            resource within the mixin. For example, if the resource is
            'database' we'll see configman namespace in the cron job section
            of "...class-SomeCronJob.database.database_connection_class" and
            "...class-SomeCronJob.database.transaction_executor_class"