wood burning stoves 2.0*
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: 394

First I would look at the purpose of @Interceptors
or what is use of intercepting a message payload in general?
subject: Payload Extractor Pattern
Similar Threads
com.ibm.ejs.container.EJBConfigurationException: NO_JCA_ADAPTER_BINDING found for MDB: ConsumerTest
Not consuming JMS messages after a certain no. of messages are processed
JBoss 5.1 ejbCreate method not called on mdb
I can't see ejbCreat(),ejbRemove or initialize() methods in this MDB.