Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

JMS reliability

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is your reason for thinking that a message might be corrupted?
 
Raymond Ong
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
 
Raymond Ong
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you let the MDB validate user input, how do you communicate to the user that their input was invalid?
 
Raymond Ong
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic