Skip to content

Commit

Permalink
Merge pull request #4 from dinuish94/update-carbon-mediation
Browse files Browse the repository at this point in the history
Update mediation version
  • Loading branch information
dinuish94 authored Jul 3, 2020
2 parents 8118221 + cff783f commit b31a935
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 38 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<automation.framework.version>4.4.3</automation.framework.version>
<emma.version>2.1.5320</emma.version>
<synapse.version>2.1.7-wso2v111</synapse.version>
<carbon.mediation.version>4.7.45</carbon.mediation.version>
<carbon.mediation.version>4.7.52</carbon.mediation.version>
<json.version>2.0.0.wso2v1</json.version>
<org.testng.version>6.1.1</org.testng.version>
<jets3t.version>0.9.4</jets3t.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,6 @@ private ConnectionConfiguration getConnectionConfigFromContext(MessageContext me
EmailConstants.SSL_PROTOCOLS);
String cipherSuites = (String) ConnectorUtils.lookupTemplateParamater(messageContext,
EmailConstants.CIPHER_SUITES);
String maxActiveConnections = (String) ConnectorUtils.lookupTemplateParamater(messageContext,
EmailConstants.MAX_ACTIVE_CONNECTIONS);
String maxIdleConnections = (String) ConnectorUtils.lookupTemplateParamater(messageContext,
EmailConstants.MAX_IDLE_CONNECTIONS);
String maxWaitTime = (String) ConnectorUtils.lookupTemplateParamater(messageContext,
EmailConstants.MAX_WAIT_TIME);
String minEvictionTime = (String) ConnectorUtils.lookupTemplateParamater(messageContext,
EmailConstants.MAX_EVICTION_TIME);
String evictionCheckInterval = (String) ConnectorUtils.lookupTemplateParamater(messageContext,
EmailConstants.EVICTION_CHECK_INTERVAL);
String exhaustedAction = (String) ConnectorUtils.lookupTemplateParamater(messageContext,
EmailConstants.EXHAUSTED_ACTION);

ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration();
connectionConfiguration.setHost(host);
Expand All @@ -116,25 +104,7 @@ private ConnectionConfiguration getConnectionConfigFromContext(MessageContext me
connectionConfiguration.setTrustedHosts(trustedHosts);
connectionConfiguration.setSslProtocols(sslProtocols);
connectionConfiguration.setCipherSuites(cipherSuites);

if (maxActiveConnections != null) {
connectionConfiguration.setMaxActiveConnections(Integer.parseInt(maxActiveConnections));
}
if (maxWaitTime != null) {
connectionConfiguration.setMaxWaitTime(Long.parseLong(maxWaitTime));
}
if (maxIdleConnections != null) {
connectionConfiguration.setMaxIdleConnections(Integer.parseInt(maxIdleConnections));
}
if (minEvictionTime != null) {
connectionConfiguration.setMinEvictionTime(Long.parseLong(minEvictionTime));
}
if (evictionCheckInterval != null) {
connectionConfiguration.setEvictionCheckInterval(Long.parseLong(evictionCheckInterval));
}
if (exhaustedAction != null) {
connectionConfiguration.setExhaustedAction(exhaustedAction);
}
connectionConfiguration.setConfiguration(ConnectorUtils.getPoolConfiguration(messageContext));

return connectionConfiguration;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ public final class EmailConstants {
public static final String TRUSTED_HOSTS = "trustedHosts";
public static final String SSL_PROTOCOLS = "sslProtocols";
public static final String CIPHER_SUITES = "cipherSuites";
public static final String MAX_ACTIVE_CONNECTIONS = "maxActiveConnections";
public static final String MAX_IDLE_CONNECTIONS = "maxIdleConnections";
public static final String MAX_WAIT_TIME = "maxWaitTime";
public static final String MAX_EVICTION_TIME = "minEvictionTime";
public static final String EVICTION_CHECK_INTERVAL = "evictionCheckInterval";
public static final String EXHAUSTED_ACTION = "exhaustedAction";
// Default email configuration values
public static final String DEFAULT_SOCKETFACTORY_FALLBACK = "false";
public static final String DEFAULT_FOLDER = "INBOX";
Expand Down

0 comments on commit b31a935

Please sign in to comment.