Here is the code snippits in proper sequence (this is all on the client side)


  | // WHILE SENDING A MESSAGE:
  | ...
  | String id = message.getJMSMessageID();
  | Queue rq = (Queue) message.getJMSReplyTo();
  | QueueResponse receiver = JMS.createReceiver((QueueConnection) getConnection(),
  |                 (QueueSession) getSession(), rq, this, "JMSCorrelationID = 
'"+id+"'");
  | sentMessages.put(id, receiver);
  | ...
  | 
  | // IN onMessage()
  | String corr = message.getJMSCorrelationID();
  | removeSentMessage(corr);
  | ...
  | 
  | // REMOVE SENT MESSAGE
  | protected boolean removeSentMessage(String id)
  |       throws javax.jms.JMSException
  | {
  |     QueueReceiver receiver = (QueueReceiver) sentMessages.remove(id);
  | 
  |     if (receiver != null)
  |     {
  |       receiver.close();
  |     }
  |     return (receiver != null);
  | }
  | 

If I don't call "receiver.close()" I never get any exceptions in the server log and it 
functions ok as long as the client is not sending messages at a high rate.  If the 
client is sending messages at a high rate then the thread count skyrockets and 
eventually throws an out-of-memory error.

If I do call "receiver.close()" then the client functions just fine, even at a high 
rate of messages (no thread/memory problems).  But I get those sporatic exceptions on 
the jboss server log (javax.jms.JMSException: The provided subscription does not 
exist) - sporadic being 1 exception for every 500-1000 messages.

I am using a single connection and single session, both the send and response queues 
are fixed/named (not temporary) the client is on a separate machine than the server.  
The server is running jboss 3.2.3 under jdk 1.4.2.   







View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3823683#3823683

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3823683


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to