Package org.apache.synapse.commons.datasource

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


     * reusing an existing repository.
     *
     * @param serverContextInformation ServerContextInformation instance
     */
    private void initDataSourceHelper(ServerContextInformation serverContextInformation) {
        DataSourceRepositoryHolder repositoryHolder = DataSourceRepositoryHolder.getInstance();
        Properties synapseProperties = SynapsePropertiesLoader.reloadSynapseProperties();
        Object repo =
                serverContextInformation.getProperty(
                        DataSourceConstants.DATA_SOURCE_INFORMATION_REPOSITORY);
        if (repo instanceof DataSourceInformationRepository) {
            repositoryHolder.init((DataSourceInformationRepository) repo, synapseProperties);
        } else {
            repositoryHolder.init(null, synapseProperties);
        }
    }
View Full Code Here


     * reusing an existing repository.
     *
     * @param serverContextInformation ServerContextInformation instance
     */
    private void initDataSourceHelper(ServerContextInformation serverContextInformation) {
        DataSourceRepositoryHolder repositoryHolder = DataSourceRepositoryHolder.getInstance();
        Properties synapseProperties = SynapsePropertiesLoader.reloadSynapseProperties();
        Object repo =
                serverContextInformation.getProperty(
                        DataSourceConstants.DATA_SOURCE_INFORMATION_REPOSITORY);
        if (repo instanceof DataSourceInformationRepository) {
            repositoryHolder.init((DataSourceInformationRepository) repo, synapseProperties);
        } else {
            repositoryHolder.init(null, synapseProperties);
        }
    }
View Full Code Here

     * reusing an existing repository.
     *
     * @param serverContextInformation ServerContextInformation instance
     */
    private void initDataSourceHelper(ServerContextInformation serverContextInformation) {
        DataSourceRepositoryHolder repositoryHolder = DataSourceRepositoryHolder.getInstance();
        Properties synapseProperties = SynapsePropertiesLoader.reloadSynapseProperties();
        Object repo =
                serverContextInformation.getProperty(
                        DataSourceConstants.DATA_SOURCE_INFORMATION_REPOSITORY);
        if (repo instanceof DataSourceInformationRepository) {
            repositoryHolder.init((DataSourceInformationRepository) repo, synapseProperties);
        } else {
            repositoryHolder.init(null, synapseProperties);
        }
    }
View Full Code Here

        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) {
                dataSource = repositoryManager.getDataSource(dataSourceName);
                if (dataSource != null) {
                    try {
                        connection = dataSource.getConnection();
View Full Code Here

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

  }
 
  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

     * reusing an existing repository.
     *
     * @param serverContextInformation ServerContextInformation instance
     */
    private void initDataSourceHelper(ServerContextInformation serverContextInformation) {
        DataSourceRepositoryHolder repositoryHolder = DataSourceRepositoryHolder.getInstance();
        Properties synapseProperties = SynapsePropertiesLoader.reloadSynapseProperties();
        Object repo =
                serverContextInformation.getProperty(
                        DataSourceConstants.DATA_SOURCE_INFORMATION_REPOSITORY);
        if (repo instanceof DataSourceInformationRepository) {
            repositoryHolder.init((DataSourceInformationRepository) repo, synapseProperties);
        } else {
            repositoryHolder.init(null, synapseProperties);
        }
    }
View Full Code Here

TOP

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

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.