}
public void testTime(){
ActiveMQTextMessageReader reader = new ActiveMQTextMessageReader();
ActiveMQTextMessageWriter writer = new ActiveMQTextMessageWriter();
ActiveMQTextMessage msg1 = new ActiveMQTextMessage();
ActiveMQTextMessage msg2 = null;
try {
int count = 10000;
long startTime = System.currentTimeMillis();
//msg1.setText(this.testStr);
msg1.setText("this is a test str");
super.initializeMessage(msg1);
for (int i = 0; i < count; i++){
byte[] data = writer.writePacketToByteArray(msg1);
msg2 = (ActiveMQTextMessage) reader.readPacketFromByteArray(data);
}
long finishTime = System.currentTimeMillis();
long totalTime = finishTime-startTime;
long ps = (count * 1000)/totalTime;