You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by brucelei <br...@126.com> on 2008/06/12 04:53:47 UTC
The problem of Stress Test on ActiveMQ+Tomcat+Spring
I am using ActiveMQ5 in tomcat6,send message with JmsTemplate,config like
this:
<!-- Spring JmsTemplate config -->
<bean id="jmsTemplate"
class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<!-- lets wrap in a pool to avoid creating a connection per send -->
<bean
class="org.springframework.jms.connection.SingleConnectionFactory">
<property name="targetConnectionFactory"
ref="jmsConnectionFactory" />
</bean>
</property>
<!-- custom MessageConverter -->
<property name="messageConverter" ref="userMessageConverter" />
</bean>
JmsTemplate.convertAndSend(destination, object);
I think this is an effective way to produce message,then I use Jmeter to run
some test on my demo:
jmeter configļ¼300 threads/http request/Ramp-up period=0s
http request like this:
http://localhost:8080/spring-web/amq.shtml
Finally I got a report:succeed 280,failure 20,look into the jmeter error
log:
<httpSample t="1016" lt="0" ts="1213178882046" s="false" lb="HTTP Request"
rc="Non HTTP response code: java.net.SocketException" rm="Non HTTP response
message: Socket is not connected: connect" tn="Thread group 1-267" dt="text"
by="1337"/>
Now my question is:
1. Non HTTP response:the error is caused by activemq or tomcat?(I think
maybe tomcat:))
2. The exception is SocketException,not JMSException,how can I and where can
I catch it? I want to process this exception properly?
Thanks for anyone's reply:-)
--
View this message in context: http://www.nabble.com/The-problem-of-Stress-Test-on-ActiveMQ%2BTomcat%2BSpring-tp17791503p17791503.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.