Supporting SMTP transport for RM
--------------------------------
Key: WSCOMMONS-456
URL: https://issues.apache.org/jira/browse/WSCOMMONS-456
Project: WS-Commons
Issue Type: Improvement
Reporter: Amila Chinthaka Suriarachchi
I recently had some tests for smtp RM support. With the following changes and
couple of changes to Sandesha2 trunk I was able to make it working. Here are
the smtp transport changes required.
1. removing using of same message ID for mail message.
2. Setting a RequestResponse transport object and set the status as wait.
This is the same issue I saw in supporting synapse NIO transport as well.
Sandesha2 SenderWorker.java 191 has the following code.
if (t==null) {
if (op != null)
inMsg =
op.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
if (inMsg != null)
t = (RequestResponseTransport)
inMsg.getProperty(RequestResponseTransport.TRANSPORT_CONTROL);
}
// If we are anonymous, and this is not a
makeConnection, then we must have a transport waiting
if((toEPR==null || toEPR.hasAnonymousAddress()) &&
(makeConnection == null ||
!makeConnection.booleanValue()) &&
(t == null ||
!t.getStatus().equals(RequestResponseTransportStatus.WAITING))) {
// Mark this sender bean so that we know that
the transport is unavailable, if the
// bean is still stored.
SenderBean bean =
senderBeanMgr.retrieve(senderBean.getMessageID());
if(bean != null && bean.isTransportAvailable())
{
bean.setTransportAvailable(false);
senderBeanMgr.update(bean);
}
// Commit the update
if(transaction != null &&
transaction.isActive()) transaction.commit();
transaction = null;
if (log.isDebugEnabled())
log.debug("Exit: SenderWorker::run, no
response transport for anonymous message");
return;
}
to send a response message this code assumes a RequestResponseTransport object
and its state is waiting.
So I had to add a new MailRequestResponseTransport class and set it to message
context at the receiver.
will attach the patch.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.