aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JMS reliability Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JMS reliability" Watch "JMS reliability" New topic
Author

JMS reliability

Raymond Ong
Ranch Hand

Joined: Jul 17, 2005
Posts: 46
How reliable are JMS implementations? Can JMS queues hold up to 1 million messages at a time? I have a design problem that I need help with. I have a servlet receiving https requests which I then send out to a JMS queue for consumption by and MDB. The request of course has to be validated. Question is, where do I put the validation of the request parameters? Upon receiving the http receive and before sending to the JMS queue or upon receiving of the message by the MDB? If i validate the request before sending to the JMS queue, can I be sure that the MDB will get exactly the same message the servlet sent or will there be instances that the message might get corrupted thus will be invalid.

Thanks very much in advance
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
What is your reason for thinking that a message might be corrupted?


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Raymond Ong
Ranch Hand

Joined: Jul 17, 2005
Posts: 46
Hi,

Of course I'm thinking worst case scenario. Are you saying that the messages cannot be corrupted? I need advice so I know where to properly put my validation. On my servlet or on the message-driven bean.

Thanks!
Tomasz Luchowski
Greenhorn

Joined: Sep 16, 2004
Posts: 15
Originally posted by Raymond Ong:
Hi,

Of course I'm thinking worst case scenario. Are you saying that the messages cannot be corrupted? I need advice so I know where to properly put my validation. On my servlet or on the message-driven bean.

Thanks!


If you put validation logic in a servlet you have a meaningful way of displaying error message... if you do that in MDB it becomes problematic. What kind of validation precisely do you want to perform?


Tomasz Luchowski<br />SCJP, SCBCD, SCWCD, SCEA part 1
Raymond Ong
Ranch Hand

Joined: Jul 17, 2005
Posts: 46
Hi,

It's more of business logic validation. Whether the required request parameters are complete and the values/data/format of the request parameters are valid. If I do the validation on the servlet, then send to request to the MDB, I worry that the request might be subject to corruption (in worst-case scenarios) so I feel that I need to do the validation on the MDB, but doing that will mean that the servlet has to pass each request to the MDB. What I can do is validate the completeness of the required request parameters on the servlet, then pass on the request to the MDB to validate the values of the request parameters.

Any other approach?

Thanks!
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

If you let the MDB validate user input, how do you communicate to the user that their input was invalid?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Raymond Ong
Ranch Hand

Joined: Jul 17, 2005
Posts: 46
Hi,

That will be done by sending out an HttpPost to another server. This is the design of the system I have to connect with.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS reliability
 
Similar Threads
Message-driven bean acknowledgment.
return value to the calling servlet from messageDrivenBean
How to kick start the DLQ
Spring+MDB+JMS+MQ+xml architecture
Help required on how to use JCA with JMS.