The only portable mechanism by which an EJB can receive JMS messages is through the use of message-driven EJBs. As message-driven EJBs are new in Version 2.0 of the EJB Specification, this implies that there is no portable way for a container that supports only earlier versions to receive asynchronous messages.
It is possible to simulate the functionality of message-driven EJBs in a system that has no support for them by writing a standalone Java program that monitors a message queue for incoming messages and calls a stateless session bean on the receipt of each message. It is an interesting exercise to consider how this differs from what happens in a ‘real’ message-driven EJB.
A message-driven EJB registers an ...