Tuesday, February 22, 2011

Message-Driven bean Vs Session bean

Message-Driven bean is integrated with Java Message Service (JMS) to provide the ability to act as message consumer and performs asynchronous processing between server and the message producer.

Session bean is a non-persistent object that implements some business logic running on server. There are two types of session Beans.
1. Steless Session Bean (each session bean can be used by multiple EJB clients)
2. Stateful Session Bean (each session is associated with one EJB client)