Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.synapse.Mediator;
import org.apache.synapse.SynapseException;
import org.apache.synapse.SynapseConstants;
import org.apache.synapse.mediators.AbstractMediator;
import org.apache.synapse.mediators.ext.ClassMediator;
import org.apache.synapse.mediators.v2.Utils;
import org.apache.synapse.mediators.v2.ext.AbstractClassMediator;
Expand Down Expand Up @@ -118,6 +119,9 @@ public Mediator createSpecificMediator(OMElement elem, Properties properties) {

try {
mediator = (Mediator) clazz.newInstance();
if (mediator instanceof AbstractMediator && FactoryUtils.isVersionedDeployment(properties)) {
((AbstractMediator) mediator).setArtifactIdentifier(properties.getProperty(SynapseConstants.SYNAPSE_ARTIFACT_IDENTIFIER));
}
} catch (Throwable e) {
String msg = "Error in instantiating class : " + name.getAttributeValue();
log.error(msg, e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ public static InboundEndpoint createInboundEndpoint(OMElement inboundEndpointEle

InboundEndpoint inboundEndpoint = new InboundEndpoint();
if (inboundEndpointElem.getAttributeValue(ATT_NAME) != null) {
inboundEndpoint.setName(FactoryUtils.getFullyQualifiedName(properties,
inboundEndpointElem.getAttributeValue(ATT_NAME)));
inboundEndpoint.setName(inboundEndpointElem.getAttributeValue(ATT_NAME));
} else {
String msg = "Inbound Endpoint name cannot be null";
log.error(msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private static SynapseLibrary createSynapseLibraryWithDeps(OMElement artifactEle
}
String packageName = readAttribute(artifactEle, LibDeployerConstants.PACKAGE_ATTR);
SynapseLibrary synLib;
if (deploymentFileData.isVersionedDeployment()) {
if (deploymentFileData != null && deploymentFileData.isVersionedDeployment()) {
synLib = new SynapseLibrary(deploymentFileData.getArtifactIdentifier(), readAttribute(artifactEle, LibDeployerConstants.NAME),
packageName);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public abstract class AbstractMediator implements Mediator, AspectConfigurable {
private boolean isSkipEnabled = false;

private SynapseMediationFlowPoint flowPoint = null;
private String artifactIdentifier;


/**
Expand Down Expand Up @@ -567,4 +568,14 @@ protected MediatorFaultHandler getLastSequenceFaultHandler(MessageContext synCtx
}
return null;
}

public String getArtifactIdentifier() {

return artifactIdentifier;
}

public void setArtifactIdentifier(String artifactIdentifier) {

this.artifactIdentifier = artifactIdentifier;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ private void updateTaskForVersioning(TaskDescription taskDescription, Properties

taskDescription.setName(FactoryUtils.getFullyQualifiedName(properties, taskDescription.getName()));
taskDescription.getXmlProperties().forEach(prop -> {
if (prop.getAttributeValue(NAME).equals("sequenceName")
|| prop.getAttributeValue(NAME).equals("proxyName")) {
if (prop.getAttributeValue(NAME).equals("sequenceName")) {
prop.setText(FactoryUtils.getFullyQualifiedName(properties, prop.getText()));
String value = prop.getAttributeValue(VALUE);
if (value != null) {
Expand Down
Loading