git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@965897 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2010-07-20 16:25:52 +00:00
parent 11705e70b4
commit 8ed8dd41c4
2 changed files with 6 additions and 1 deletions

View File

@ -161,7 +161,7 @@ public class LegacyFrameTranslator implements FrameTranslator {
return converter.createTempTopic(name);
} else {
throw new ProtocolException("Illegal destination name: [" + name + "] -- ActiveMQ STOMP destinations "
+ "must begine with one of: /queue/ /topic/ /temp-queue/ /temp-topic/");
+ "must begin with one of: /queue/ /topic/ /temp-queue/ /temp-topic/");
}
}

View File

@ -60,6 +60,8 @@ import org.apache.activemq.util.IOExceptionSupport;
import org.apache.activemq.util.IdGenerator;
import org.apache.activemq.util.IntrospectionSupport;
import org.apache.activemq.util.LongSequenceGenerator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContextAware;
/**
@ -67,6 +69,8 @@ import org.springframework.context.ApplicationContextAware;
*/
public class ProtocolConverter {
private static final Log LOG = LogFactory.getLog(ProtocolConverter.class);
private static final IdGenerator CONNECTION_ID_GENERATOR = new IdGenerator();
private final ConnectionId connectionId = new ConnectionId(CONNECTION_ID_GENERATOR.generateId());
@ -202,6 +206,7 @@ public class ProtocolConverter {
}
protected void handleException(Throwable exception, StompFrame command) throws IOException {
LOG.warn("Exception occured processing: \n" + command, exception);
// Let the stomp client know about any protocol errors.
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter stream = new PrintWriter(new OutputStreamWriter(baos, "UTF-8"));