JaiswalTraining

Get the online training



Corejava Servlet Jsp  Php  Hibernate  Ajax Web Service   Ejb2.1 Ejb3.0 Struts Struts2  JPA Spring Ibatis   JSF    JSF2.0  CoreJavaDesignPattern    Jquery  Flex J2EE-Design-Patterns  Jboss7  Maven  Contact Me                                                                                                                                                                        
            IGNOU SMU PTU Project                                           Training                                                                                                                              
              

Contact Us  0091- 9210721663         jaiswaltraining@gmail.com




Corejava
Servlet
Jsp
Php
Hibernate
Ajax
Web Service
Ejb2.1
Ejb3.0
Struts  
Struts2
JPA
Spring
Ibatis
JSF
JSF2.0
CoreJavaDesignPattern
Jquery
Flex
J2EE-Design-Patterns
Jboss7
Maven








Introduction to EJB

Enterprise Java Beans

  • It is just a collection of java classes and an xml file, bundled into a single unit.
  • An EJB runs in a EJB Container
  • EJB Components are designed to encapsulate business logic
  • No need for application developer to  worry about many system-level issues, including transactions, security, scalability, concurrency, communication, resource management, persistence, error handling and operating environment independence.
  • EJBs are reusable components
  • EJBs are intended to be a reusable bundle of business logic.
  • EJBs can work with any kind of client.



Difference between JavaBeans and EJB

  • JavaBeans architecture is designed to provide a format for general-purpose components
  • whereas EJB architecture provides a format for highly specialized business logic components deployed in a J2ee container.


       
EJB Container

  • Container is an execution environment for a component.
  • The component lives in the container and the container provides services for the component.



  • Software Architecture




  • Home interface – primarily meant for lifecycle operations such as creating , finding and removing EJBs.
  • Remote interface- is for business methods.
  • Local interface- similar to remote interface but is only accessible by EJBs in the same deployment unit.


Types of Beans




Session Beans

  • A session bean is a type of enterprise bean.
  • A type of EJB server-side component.
  • Session bean components implement the javax.ejb.SessionBean interface and can be stateless or stateful.
  • Stateless session beans are components that perform transient services.
  • Stateful session beans are components that are dedicated to one client and act as a server-side extension of that client.



Stateless & Stateful Session Bean

  • A stateful session bean can keep data between client  accesses.
  • A stateless session bean cannot


Lifecycle of Stateless Session Bean





Lifecycle of Stateless Session Bean



 





Entity Bean Lifecycle






Ejb2.1 in jboss

Ejb2.1 in websphere


Ejb2.1 in weblogic





             Previous                                                           Home                                                                       Next