Package org.apache.synapse.commons.datasource

Examples of org.apache.synapse.commons.datasource.DataSourceInformationRepository


            serverManager = new ServerManager();
            ServerContextInformation contextInfo = new ServerContextInformation(configContext,
                    configurationInformation);

            if (dataSourceInformationRepositoryService != null) {
                DataSourceInformationRepository repository =
                        dataSourceInformationRepositoryService.getDataSourceInformationRepository();
                contextInfo.addProperty(DataSourceConstants.DATA_SOURCE_INFORMATION_REPOSITORY,
                        repository);
            }
View Full Code Here


        int tenatId = SuperTenantCarbonContext.getCurrentContext(
                configurationContext).getTenantId();
        DataSourceInformationManager dataSourceInformationManager =
                new DataSourceInformationManager();
        try {
            dataSourceInformationManager.setRepository(new DataSourceInformationRepository());
            dataSourceInformationManager.setRegistry(DataSourceServiceComponent.
                    getRegistryService().getConfigSystemRegistry(tenatId));
        } catch (RegistryException e) {
            log.error(e);
        }
View Full Code Here

                (Map<Integer, DataSourceInformationRepository>) this.getConfigContext().getProperty(
                DataSourceServiceComponent.DATA_SOURCE_REPOSITORY_MAP);
        try {
            dataSourceInformationManager.setRegistry(DataSourceServiceComponent.getRegistryService().
                    getConfigSystemRegistry(tenantId));
            DataSourceInformationRepository currentRepo = repositoryMap.get(tenantId);
            dataSourceInformationManager.setRepository(currentRepo);
            DataSourceInformationRepositoryServiceImpl.setDataSourceInformationRepository(currentRepo);
        } catch (RegistryException e) {
            log.error(e);
        }
View Full Code Here

        DataSource dataSource;

        DataSourceInformationRepositoryService repositoryService =
                ReportingComponent.getCarbonDataSourceService();
        if (repositoryService != null) {
            DataSourceInformationRepository datasourceRepo =
                    repositoryService.getDataSourceInformationRepository();
            DataSourceRepositoryHolder dataSourceHelper = DataSourceRepositoryHolder.getInstance();
            dataSourceHelper.init(datasourceRepo, null);
            repositoryManager = dataSourceHelper.getDataSourceRepositoryManager();
            if (repositoryManager != null) {
View Full Code Here

    return DSErrorList;
  }

  private static Connection createConnection(String dataSourceId)
      throws SQLException {
    DataSourceInformationRepository repository = DataServicesDSComponent
        .getCarbonDataSourceService()
        .getDataSourceInformationRepository();
    DataSourceRepositoryHolder dataSourceHelper = DataSourceRepositoryHolder
        .getInstance();
    dataSourceHelper.init(repository, null);
View Full Code Here

  public void initCarbonDSService(DataSourceInformationRepositoryService cdService) {
    this.dataSource = this.createDataSource(cdService);
  }
 
  private DataSource createDataSource(DataSourceInformationRepositoryService cdService) {
    DataSourceInformationRepository datasourceRepo = cdService.
        getDataSourceInformationRepository();
    DataSourceRepositoryHolder dataSourceHelper = DataSourceRepositoryHolder.getInstance();
    dataSourceHelper.init(datasourceRepo, null);
    return dataSourceHelper.getDataSourceRepositoryManager().getDataSource(
      this.getDataSourceName());
View Full Code Here

                dataSourceInformationManager = new DataSourceInformationManager();
                dataSourceInformationManager.setRepository(getDSFromCarbonDSConfig());
                dataSourceInformationManager.setRegistry(registry);

                DataSourceInformationRepository repository
                        = dataSourceInformationManager.getRepository();
               
                @SuppressWarnings("unchecked")
                Map<Integer, DataSourceInformationRepository> repositoryMap =
                        (Map<Integer, DataSourceInformationRepository>) configurationContext.
View Full Code Here

            String propertiesFile = carbonConfDir + File.separator +
                    DATA_SOURCE_PROPERTIES;
            return DataSourceInformationRepositoryFactory.createDataSourceInformationRepository(
                    loadProperties(propertiesFile));
        } else {
            return new DataSourceInformationRepository();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.synapse.commons.datasource.DataSourceInformationRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.