One
word answer: MDBs (actually it is a 3 word answer
)
You would create a message driven bean and subscribe it using the app server's deployment tools, when the message arrives, the method on you MDB will get invoked.
SJCP, SCBCD, SJCD, SCDJWS, SCEA (Part I)