Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

Developing entity beans does not require a business interface; in fact, message-driven beans are the only EJBs that must implement some business interface.

Hi,

I was  reading as below

Developing entity beans does not require a business interface; in fact, message-driven beans are the only EJBs that must implement some business interface.

from the link
http://www.javaworld.com/article/2071724/java-web-development/ejb-fundamentals-and-session-beans.html

i have not understood why enitiry beans do not require business interface whereas MDBs do.





what is Business interface and what are its uses.

When an EJB-based application needs to receive asynchronous messages from other systems, it can leverage the power and convenience of message-driven beans. Asynchronous messages between systems can be analogous to the events that are fired from a UI component to an event handler in the same JVM. For example, in the business-to-business (B2B) domain, a wholesaler could have an EJB application that uses message-driven beans to listen for purchase orders issued electronically from retailers.
how MDBs analogous to UI and same JVM?



Session beans are great at implementing business logic, processes, and workflow. For example, a StockTrader bean with buy() and sell() methods, among others, would be a good fit for a session bean.
Entity beans are the persistent data objects in an EJB application. In a stock trading application, a Stock bean with setPrice() and getPrice()methods would be an appropriate use of an entity bean. The buy() method of the previously mentioned StockTrader session bean would interact with instances of the Stock entity bean by calling their getPrice() methods, for example.
Message-driven beans are used for the special purpose of receiving asynchronous messages from other systems, like a wholesaler application that listens for purchase orders.
how they are session bean suitable for buy() sell() kind of StockTrader Applications where as entity bean for getPrice and setPrice??

please advise
ASKER CERTIFIED SOLUTION
Avatar of gudii9
gudii9
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial