This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes EJB and other Java EE Technologies and the fly likes Question regarding JMS. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "Question regarding JMS." Watch "Question regarding JMS." New topic
Author

Question regarding JMS.

Deepak A
Ranch Hand

Joined: Oct 04, 2001
Posts: 120
Hi,

We have a sender and a receiver in a P2P communication model.
In case the sender is trying to send some data to the receiver, and the netork fails.

1. Will the sender be notified that the data packet is not received by the receiver.
2. Will the sender get an error saying that connection with the receiver failed.
3. How will sender check whether receiver is up or not ? Any particular method that will be used.

Thanks,
Deepak.
Abhishek Upadhyay
Greenhorn

Joined: Dec 06, 2009
Posts: 4
Acknowledgement would work. IF Acknowledgement is not received, it means failure.
I beleive AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, and DUPS_OK_ACKNOWLEDGE, any one would help
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

>In case the sender is trying to send some data to the receiver, and the netork fails.

Sender sends data to the jms server, not the receiver. The jms server sends it out to the receiver.

>In case the sender is trying to send some data to the receiver, and the netork fails.

Change the question to the sender tries to send data to the jms server
And the answer for that is the message sending from client to the jms server itself is a synchronous call. The QueueSender.send() message will throw a JMSException if the message isnt posted to the server for some reason.

Does that answer your question?

ram.
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

>Acknowledgement would work. IF Acknowledgement is not received, it means failure.

Acknowldgement is on the receiver side. If the jms server does not receive an acknowledgement from the receiver that it has received a message, the message would be put back in the queue/topic. Whether it would be redelivered depends on a lot of other considerations.

ram.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Question regarding JMS.
 
Similar Threads
security
How to get sender's ip at receiver side!!
Passing values from one method to another
What is the maximum amount of data that can be sent ina XML request
JMS getMessageData Error