Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes How does JMS pass messages? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How does JMS pass messages?" Watch "How does JMS pass messages?" New topic
Author

How does JMS pass messages?

Chris Johnston
Ranch Hand

Joined: Dec 13, 2004
Posts: 85
Simple question: how does JMS pass messages, by reference or by value?

If I have two topics, topic1 and topic2, with messages-driven beans registered with each topic:

topic1 --> mdb1
topic2 --> mdb2

I have a message that consists of some data, say it is a 20KB jpeg file encapsulated within an object, data1, that I then put inside a message, say message1. I then want to pass that message from topic1 to topic2 using the mdbs.

How does JMS handle passing the data? Does it simply pass the message containing references to the embedded object (pass by reference) or does it pass all the data from topic to topic (pass by value)?

What happens when I increase the size of the contained object (the jpeg) to 1MB in size? How does this affect JMS?

I would think that if it used pass by reference, then the size of the enclosed data does not matter. Whereas, if it is pass by value, then the larger the objects being passed, the slower JMS would work.

This is all happening within a single app server.

Any ideas?
[ June 23, 2005: Message edited by: Chris Johnston ]

www.fuzzylizard.com
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How does JMS pass messages?