Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Payload Extractor Pattern

 
Shankar sanjay
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was going through Payload Extractor pattern in Real World Java EE Patterns Rethinking Best Practices Adam Bien Book, the following code found.

MDB Bean class:



PayLoad Extractor Class:



the question is Logic of Payload extractor (extracting messages and invoke consume method) can be done in onMessage method itself. What is the use of this pattern?, i dont find any value added using this approach, can anyone please explain better?
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Interceptors(PayloadExtractor.class)


First I would look at the purpose of @Interceptors
or what is use of intercepting a message payload in general?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic