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

Payload Extractor Pattern

 
Shankar sanjay
Ranch Hand
Posts: 117
  • 0
  • 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
  • 0
  • 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