コード例 #1
0
  /**
   * The mediation library deployer will handling the process of deploying the libararyArtifacts,
   * this is required since the library specific artifacts has to be initialized priorly for the
   * cases like connectors
   */
  private void deployMediationLibraryArtifacts() {
    if (configurationContext == null || synapseConfiguration == null) {
      return;
    }
    DeploymentEngine deploymentEngine =
        (DeploymentEngine) configurationContext.getAxisConfiguration().getConfigurator();
    String carbonRepoPath = configurationContext.getAxisConfiguration().getRepository().getPath();
    SynapseArtifactDeploymentStore deploymentStore =
        synapseConfiguration.getArtifactDeploymentStore();

    String synapseImportDir =
        synapseConfiguration.getPathToConfigFile()
            + File.separator
            + MultiXMLConfigurationBuilder.SYNAPSE_IMPORTS_DIR;

    /*Registering Import Deployer is not required here.*/
    // deploymentEngine.addDeployer(new ImportDeployer(), synapseImportDir, "xml");

    String libsPath = carbonRepoPath + File.separator + "synapse-libs";
    deploymentEngine.addDeployer(new LibraryArtifactDeployer(), libsPath, "zip");
  }