Package org.talend.esb.mep.requestcallback.feature

Examples of org.talend.esb.mep.requestcallback.feature.Configuration


  public void setJmsConfiguration(JMSConfiguration jmsConfiguration) {
    this.jmsConfiguration = jmsConfiguration;
  }

  private void configureJndi(JMSConfiguration jmsConfiguration) {
    final Configuration cfg = configuration == null
        ? CallContext.resolveConfiguration(serviceName) : configuration;
    JNDIConfiguration jndiCfg = jmsConfiguration.getJndiConfig();
    final String jndiConnectionFactoryName = getJndiProperty("jndiConnectionFactoryName");
    if (jndiConnectionFactoryName != null) {
      if (jndiCfg == null) {
        jndiCfg = new JNDIConfiguration();
        jmsConfiguration.setJndiConfig(jndiCfg);
      }
      jndiCfg.setJndiConnectionFactoryName(jndiConnectionFactoryName);
    }
    final String connectionUserName = getJndiProperty("connectionUserName");
    if (connectionUserName != null) {
      if (jndiCfg == null) {
        jndiCfg = new JNDIConfiguration();
        jmsConfiguration.setJndiConfig(jndiCfg);
      }
      jndiCfg.setConnectionUserName(connectionUserName);
    }
    final String connectionPassword = getJndiProperty("connectionPassword");
    if (connectionPassword != null) {
      if (jndiCfg == null) {
        jndiCfg = new JNDIConfiguration();
        jmsConfiguration.setJndiConfig(jndiCfg);
      }
      jndiCfg.setConnectionPassword(connectionPassword);
    }
    Properties env = jndiCfg == null ? null : jndiCfg.getEnvironment();
    final boolean hasNoEnv = env == null;
    if (hasNoEnv) {
      env = new Properties();
    }
    cfg.fillProperties("jndiConfig.environment", env);
    if (workPrefix != null) {
      cfg.fillProperties(workPrefix + "jndiConfig.environment", env);
    }
    if (hasNoEnv && !env.isEmpty()) {
      if (jndiCfg == null) {
        jndiCfg = new JNDIConfiguration();
        jmsConfiguration.setJndiConfig(jndiCfg);
View Full Code Here


  private String resolveConfigIdentifier() {
    if (configuration.getAlternateConfigurationIdentifier() == null) {
      return configuration.getConfigurationIdentifier();
    }
    final Configuration baseConfig = ConfigurationInitializer.resolveConfiguration(null);
    String key = configuration.getConfigurationName().toString() + ".pidMode";
    PidMode pidMode = baseConfig.getPidModeProperty(key);
    if (pidMode == null) {
      pidMode = baseConfig.getPidModeProperty("default.pidMode");
    }
    if (pidMode == PidMode.FULL_NAME) {
      return configuration.getConfigurationIdentifier();
    }
    return configuration.getAlternateConfigurationIdentifier();
View Full Code Here

TOP

Related Classes of org.talend.esb.mep.requestcallback.feature.Configuration

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.