if (info == null)
{
return true;
}
ProducerSessionInformation sessionInfo = info.sessionInfo;
if (sessionInfo == null)
{
return true;
}
SOAPMessage message = msgContext.getMessage();
MimeHeaders mimeHeaders = message.getMimeHeaders();
StringBuffer cookie = new StringBuffer(64);
if (sessionInfo.isPerGroupCookies())
{
if (info.groupId == null)
{
throw new IllegalStateException("Was expecting a current group Id...");
}
String groupCookie = sessionInfo.getGroupCookieFor(info.groupId);
if (groupCookie != null)
{
cookie.append(groupCookie);
}
}
String userCookie = sessionInfo.getUserCookie();
if (userCookie != null)
{
if (cookie.length() != 0)
{
cookie.append(','); // multiple cookies are separated by commas: http://www.ietf.org/rfc/rfc2109.txt, 4.2.2