What is EJB and Why it cames into Picture

Enterprise beans:These are the Java EE server side components that run inside the ejb container and encapsulates the business logic of an enterprise application

Benefits:
-----------------------
1.EBeans are used for developing distributed,large Application.
2.The client developer can focus only on the representation style of the client as all the business logic of the application is contained in the enterprise beans. The client developer does not bother about the code that implements business logic or the logic to access the databases
3.Reusage can be done to develope new app from existing one.
4.EBeans are portable.

Types:
1. session EJB: Execute single or multiple methods for clients. These types of bean are not shared by client and not persistence. Meaning When client terminates, session ejb terminates and no longer associated with client.


2. message driven EJB: There types of beans are able to listen for JMS Messages(Java Messaging services messages). It provide mechanism for J2EE application to deal with Message Driven legacy application.

3. entity EJB : It represents business object like customer,order in persistence storage like relational db. they have corresponding table in relational database and each instance of this entity bean have row in table.


1 comment: