Re: OutOfMemoryException in consumer

2010-03-24 Thread Milan Tomic
/javalangoutofmemory.html On 24 March 2010 09:37, Milan Tomic wrote: > Is this consumer code OK? Sometimes I got OutOfMemoryException and I can't > find what resources I am not releasing... > > while (true) { > try { >Connection conn = oraPC.getConnection(); >State

OutOfMemoryException in consumer

2010-03-24 Thread Milan Tomic
Is this consumer code OK? Sometimes I got OutOfMemoryException and I can't find what resources I am not releasing... while (true) { try { Connection conn = oraPC.getConnection(); Statement stmt = null; try { while ((message = mq_consumer.receive(10)) != null) { if (mes

Batch processing

2009-05-20 Thread milan tomic
Howdy, I have this case: For each message that comes, I have to insert an record into MY_LOG table and to make commit. Commits slows my DB, so I have decided to use MQ. The question is: does MQ supports batch processing of messages? Can I say: give me 50 messages from the queue at once, so I wou