Enterprise JavaBeans Components

Andy Ju An Wang, Kai Guo Qian · 2005

The Enterprise JavaBeans (EJB) provides a complete component infrastructure for constructing and deploying Java-based software components. The component model of EJB defines reusable components in enterprise applications and distributed computing environment. Any EJB component has two interfaces, home interface and remote interface, and one bean class to implement the interfaces. The EJB home interface manages the lifecycle of an EJB object such as creating, removing an EJB instance and finding an entity bean instance by primary-key. The remote interface provides and exposes all business logic methods to be used by its clients. The implementation bean class extends a session bean or entity bean class depending on the type of this EJB component. EJB components are hosted in an EJB container, which provides all necessary run-time services, making EJB components more portable and scalable. An EJB component is packed, assembled, and finally deployed on a server. This is why we call EJB components as server side reusable components, comparing to JavaBeans components discussed in Chapter 3, which are called client side reusable components. EJB components are widely used in distributed computing applications in a local area network, wide area network, or Internet. EJB components work well with other components such as CORBA components, Servlets, or JSP web components.

Read the paper · More papers on PaperTik