File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS : Difference between a Persistent and a Non Persistent Message

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

This question is with respect to persistent messages , and non persistent messages .

As per the docs it says that for persistent messages the QueueSender.send() blocks until it recivies an acknowledgement .

Here my question is what is the difference between a persistent messages , and non persistent messages
Thanks in advance .

 
gopinathang ganapathy
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
message can be persisted to avoid message lost [for example jvm crash]. message can persisted to db/file system based on the messaging service configuration. in this case when the message service gets a message it makes sure it persist the message successfully before it sends ack.

hth
Gopi
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Gopi , that was a nice answer ,

Assume a scenario in case of a Persistent Messages , assume that the Message has been persisted in the File system / or in a database and has been picked up from the Queue from a MDB , so waht is the appropaite time to delete that Message from the Filesystem / Database ??

Thanks .

 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so waht is the appropaite time to delete that Message from the Filesystem / Database

None.
The JMS server does that when it receives an acknowledgement that the Message has been consumed.

ram.
 
Yogesh Tyagi
Ranch Hand
Posts: 40
Eclipse IDE Java Tomcat Server
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic