Hi everyone,
i'm working with JMS. I did a simple class than send 500.000 messages to a queue.
After sending, i close the resouces. the problem is that when it send a message, increases memory space. When this has sent 14,500 messages throws an exception:
Exception in
thread "Timer-0" java.lang.OutOfMemoryError:
Java heap space
at java.nio.ByteBuffer.wrap(Unknown Source)
at java.lang.StringCoding$StringDecoder.decode(Unknown Source)
at java.lang.StringCoding.decode(Unknown Source)
at java.lang.String.<init>(Unknown Source)
this is the class:
http://pastebin.com/WZbz8VNN
thank you very much for the help