public function setCurrentSite( $site )
    {
        eZWebDAVContentBackend::appendLogEntry( __FUNCTION__ . '1:' . $site );
        $access = array( 'name' => $site,
                         'type' => eZSiteAccess::TYPE_STATIC );

        $access = eZSiteAccess::change( $access );
        eZWebDAVContentBackend::appendLogEntry( __FUNCTION__ . '2:' . $site );

        eZDebugSetting::writeDebug( 'kernel-siteaccess', $access, 'current siteaccess' );

        // Clear/flush global database instance.
        $nullVar = null;
        eZDB::setInstance( $nullVar );
    }