protected function getDatasourceFiles()
    {
        // if we have a valid app base we will collect all datasources
        $datasourceFiles = array();
        if (is_dir($appBase = $this->getAppBase())) {
            // get all the global datasource files first
            $datasourceFiles = array_merge(
                $datasourceFiles,
                $this->prepareDatasourceFiles(
                    $this->getDeploymentService()->globDir($appBase . DIRECTORY_SEPARATOR . '*-ds.xml', 0, false)
                )
            );
            // iterate over all applications and collect the environment specific datasources
            foreach (glob($appBase . '/*', GLOB_ONLYDIR) as $webappPath) {
                // append the datasource files of the webapp
                $datasourceFiles = array_merge(
                    $datasourceFiles,
                    $this->prepareDatasourceFiles(
                        $this->getDeploymentService()->globDir(AppEnvironmentHelper::getEnvironmentAwareGlobPattern($webappPath, 'META-INF' . DIRECTORY_SEPARATOR . '*-ds'))
                    )
                );
            }
        }
        // return the found datasource files
        return $datasourceFiles;
    }