This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Payload Extractor Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Payload Extractor Pattern " Watch "Payload Extractor Pattern " New topic

Payload Extractor Pattern

Shankar sanjay
Ranch Hand

Joined: Sep 14, 2009
Posts: 117

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

Joined: Jul 26, 2011
Posts: 471

First I would look at the purpose of @Interceptors
or what is use of intercepting a message payload in general?
I agree. Here's the link:
subject: Payload Extractor Pattern
It's not a secret anymore!