[jboss-user] [JBoss Messaging] - Re: OutOfMemoryError with JBoss Messaging

timfox do-not-reply at jboss.com
Tue May 6 04:13:43 EDT 2008


"harish43" wrote : 
  | 1. Lookup /ConnectionFactory
  | 2. Lookup Queue
  | 3. Create Connection
  | 4. Create Session
  | 5. Create Producer
  | 6. Create Text Message
  | 7. Send message
  | 8. Create Consumer
  | 9. Start the connection
  | 10. Receive text message
  | 11. Close connection
  | 

Short answer: Don't do this!

It's a classic anti-pattern to lookup, create connection, create session etc for each message.

This will be very slow. Look ups, connection creation, session creation etc are _heavyweight_ operations.




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

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



More information about the jboss-user mailing list