I have tried my config with released Mule 2.0 and there is still the memory leak (I just want to metion one more time that this configuration causes memory leak also in Mule 1.4.3, but not in Mule 1.4.4 Snapshot, even not in Mule 1.5).
The action is:
1. soap message is sent on axis inbound endpoint by some client
2. transformation from soap message to jms message is done, because of ActiveMQ
3. message is sent to ActiveMQ
These actions are included in my config:
<custom-transformer name="SOAPEnvelopeToJMSMessage" class="ns.jms.transformers.SOAPEnvelopeToJMSMessage" />
<service name="P2PForwarderService">
<inbound>
<inbound-endpoint address="axis:http://163.242.48.228:8180/services" synchronous="true">
<soap:http-to-soap-request-transformer/>
<properties>
<spring:entry key="style" value="message"/>
<spring:entry key="use" value="literal"/>
</properties>
</inbound-endpoint>
</inbound>
<component class ="ns.service.umo.P2PForwarderService"/>
<outbound>
<outbound-pass-through-router>
<outbound-endpoint address="jms://queue.p2p.hlrfe1" connector-ref="activeMQConnector" synchronous="true"
transformer-refs="SOAPEnvelopeToJMSMessage">
<properties>
<spring:entry key="use" value="literal"/>
</properties>
</outbound-endpoint>
</outbound-pass-through-router>
</outbound>
</service>
This is the implementation of transformer SOAPEnvelopeToJMSMessage used in my configuration:
package ns.jms.transformers;
import javax.xml.soap.SOAPEnvelope;
import org.mule.transport.jms.transformers.ObjectToJMSMessage;
import org.mule.api.MuleMessage;
import org.mule.api.transformer.TransformerException;
public class SOAPEnvelopeToJMSMessage extends ObjectToJMSMessage
{
public SOAPEnvelopeToJMSMessage()
{
super();
this.registerSourceType(Object.class);//Because the type will be an SOAPEnvelope array
}
@Override
public Object transform (MuleMessage umoMess, String encoding) throws TransformerException
{
Object msgBeforeTransformation = null;
Object msgAfterTransformation = null;
msgBeforeTransformation = (Object) umoMess.getPayload ();
if (msgBeforeTransformation instanceof Object[] && ((Object[])msgBeforeTransformation).length > 0 && ((Object[])
msgBeforeTransformation)[0] instanceof SOAPEnvelope)
{
SOAPEnvelope envlp = (SOAPEnvelope) ((Object[])msgBeforeTransformation)[0];
if (envlp != null)
{
Object custSrc = envlp.toString();
umoMess.setPayload (custSrc);
if (custSrc != null)
{
msgAfterTransformation = super.transform (umoMess, encoding);
}
}
}
if (msgAfterTransformation == null)
{
throw new TransformerException(this, new NullPointerException("Failed to trasnform the message"));
}
return msgAfterTransformation;
}
}
This is implementation of P2PForwarderService used in my configuration:
package ns.service.umo;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import org.mule.RequestContext;
import org.mule.api.MuleEventContext;
import org.mule.api.lifecycle.Callable;
public class P2PForwarderService implements Callable, P2PForwarderServiceInterface
{
public Object onCall(MuleEventContext context){
return context.getMessage();
}
public void forward (SOAPEnvelope request, SOAPEnvelope response) throws SOAPException {
MuleEventContext ctx = RequestContext.getEventContext();
ctx.getMessage().setStringProperty("Final_endpoint","UMO2");
}
}
Hi, do you mean that the error is there in 2.0 ? What is the action you'd like taken?