String providerId = (String) handlerCtx.getInputValue("ProviderId");
String providerType = (String) handlerCtx.getInputValue("ProviderType");
String className = (String) handlerCtx.getInputValue("ClassName");
ConfigConfig config = AMXUtil.getConfig(configName);
MessageSecurityConfig msgConfig = config.getSecurityServiceConfig().getMessageSecurityConfigMap().get(msgSecurityName);
ProviderConfig provConfig = null;
if(!edit){
boolean isDefault = (Boolean)handlerCtx.getInputValue("DefaultProvider");
String msgObjName = "com.sun.appserv:type=configs,category=config";
String createOperName = "createMessageSecurityProvider";
/*paramsForMsgSecProv = {"messageLayer", "providerId", "providerType", "providerClassName",
"requestAuthSource", "requestAuthRecipient", "responseAuthSource", "responseAuthRecipient",
"isDefaultProvider", "properties", "targetName"}; */
String[] types = new String[] {"java.lang.String", "java.lang.String",
"java.lang.String", "java.lang.String", "java.lang.String",
"java.lang.String", "java.lang.String", "java.lang.String",
"boolean", "java.util.Properties", "java.lang.String" };
Object[] createParams = {msgSecurityName, providerId, providerType, className,
null, null, null, null, isDefault, null, configName};
JMXUtil.invoke(msgObjName, createOperName, createParams, types);
if (File.separatorChar == '\\'){
//For Window, there is a timing issue that we need to put in some delay.
Thread.sleep(2000);
}
provConfig = msgConfig.getProviderConfigMap().get(providerId);
AMXUtil.editProperties(handlerCtx, provConfig);
}else{
provConfig = msgConfig.getProviderConfigMap().get(providerId);
provConfig.setProviderType((String)handlerCtx.getInputValue("ProviderType"));
provConfig.setClassName((String)handlerCtx.getInputValue("ClassName"));
AMXUtil.editProperties(handlerCtx, provConfig);
}
/*if(!edit){