What is Enterprise JAVABEANS?
The topic of Enterprise Javabeans is too vast to be explained within this answer.Enterprise JavaBeans provide the mechanism and architectute for component based distributed architecture. Enterprise JavaBeans are components that may be "plugged in" to a server which enable extending a Server's functionality. An EJB component is a Java class, written by an EJB developer, that implements business logic. An Enterprise JavaBean is a component, just like a traditional JavaBean. Enterprise JavaBeans execute within an EJB container, which in turn executes within an EJB server. Any server that can host an EJB container and provide it with the necessary services can be an EJB server.
Client programs execute methods on remote EJBs by way of an EJB object. The EJB object implements the "remote interface" of the EJB component on the server. The remote interface represents the "business" methods of the EJB component. The remote interface does the actual, useful work of an EJB object, such as creating an order form or entering a remote bank transaction into the database.
You can create a analogy of a EJB component and object with a VCR and its remote control. VCR is an EJB component and the EJB object is analogous to your remote control: both the VCR and the remote control have the same buttons on the front, but they perform different functions. Pushing the Forward button on your VCR's remote control is equivalent to pushing the Forward button on the VCR itself, even though it's the VCR -- and not the remote -- that actually forwards a tape.
When a developer designs a new EJB component, writing the code that makes up the enterprise bean class is not enough in itself. The EJB programmer must also write two Java interfaces that will be used by helper classes. These mandatory interfaces must extend the standard EJBObject and EJBHome interfaces, which are extensions of the java.rmi.Remote marker interface. The interface that extends the standard EJBObject interface, referred to as the enterprise bean's remote interface, specifies the business methods that are defined in the bean itself. When an application invokes a business method on an enterprise bean, the application does not access the bean itself. The method invocation is actually routed to the object that implements the extension of the EJBObject interface. This practice is referred to as delegation, and is a design point in the EJB architecture:
Similarly, call the addEmployee() method on an EJB object, and it calls (indirectly, through the network) the addEmployee() method on the remote EJB component. The EJB component model is thus a very powerful model for building enterprise applications and is the focal point of the Java 2, Enterprise Edition (J2EE) architecture.
FAQ Home
Sponsored links
Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.
Check Out IT Certification Preparation Materials
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
Sign Up With SkillSoft & Get Access to Training Materials for Over 50 Professional Certifications.
SFTP components for .NET
Add complete SSH and SFTP support to your .NET framework application
Add complete SSH and SFTP support to your .NET framework application
Virtual File System SDK
Create your own file systems in Windows and .NET applications
Create your own file systems in Windows and .NET applications
PureCM Software Configuration Management
Version control and integrated issue tracking - powerful and easy to use. Get your FREE trial now!
Version control and integrated issue tracking - powerful and easy to use. Get your FREE trial now!
