Article by www.csedukit.com :
JavaBeans are reusable software components for Java that can be manipulated visually in a builder tool. Practically, they are classes written in the Java programming language conforming to a particular convention. They are used to encapsulate many objects into a single object (the bean), so that they can be passed around as a single bean object instead of as multiple individual objects. A JavaBean is a Java Object that is serializable, has a nullary constructor, and allows access to properties using getter and setter methods.
Java Bean conventions
In order to function as a JavaBean class, an object class must obey certain conventions about method naming, construction, and behavior. These conventions make it possible to have tools that can use, reuse, replace, and connect JavaBeans.
The required conventions are as follows:
*The class must have a public default constructor (no-argument). This allows easy instantiation within editing and
activation frameworks.
*The class properties must be accessible using get, set, is (used for boolean properties instead of get) and other methods
(so-called accessor methods and mutator methods), following a standard naming-convention. This allows easy
automated inspection and updating of bean state within frameworks, many of which include custom editors for various
types of properties.
*The class should be serializable. It allows applications and frameworks to reliably save, store, and restore the bean's
state in a fashion independent of the VM and of the platform.
Enterprise Java Beans
The Enterprise Java(TM) beans architecture is a component architecture for the development and deployment of component-based distributed business applications. Applications that are written using the Enterprise Java beans architecture can be written once, and then deployed on any server platform that supports the Enterprise Java beans specification. Java 2 Platform, Enterprise Edition (J2EE) applications implement server-side business components using Enterprise Java beans (EJBs) that include session beans and entity beans.
Session beans represent business services and are not shared between users. Entity beans are multi-user, distributed transactional objects that represent persistent data. The transactional boundaries of a EJB application can be set by specifying either container-managed or bean-managed transactions.
EJB Container or EJB Server
An EJB container is nothing but the program that runs on the server and implements the EJB specifications. EJB container provides special type of the environment suitable for running the enterprise components. Enterprise beans are used in distributed applications that typically contains the business logic. The container performs the various tasks few of them are illustrated below:
Transaction Management
Security
Resource and life cycle management
Remote Accessibility
Concurrency control
Clustering and load-balancing
0 comments:
Post a Comment