File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
jQuery in Action, 3rd edition