Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

A beginner's guide to Enterprise JavaBeans

An introductory overview of the Java server-side application component standard

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 3 of 7

Both database and application systems can be enhanced by adding additional tiers to the architecture. So-called three-tier systems place an intermediate component between the client and the server. An entire industry -- middleware -- has cropped up to address the liabilities of two-tier systems. A transaction-processing monitor, one type of middleware, receives streams of requests from many clients, and may balance the load between multiple servers, provide failover when a server fails, and manage transactions on a client's behalf. Other types of middleware provide communications protocol translation, consolidate requests and responses between clients and multiple heterogeneous servers (this is particularly popular in dealing with legacy systems in business process reengineering), and/or provide service metering and network traffic information.

Multiple tiers provide a flexibility and interoperability that has resulted in systems with more than these three layers of service. For example, n-tier systems are generalizations of three-tier systems, each layer of software providing a different level of service to the layers above and beneath it. The n-tier perspective considers the network to be a pool of distributed services, rather than simply the means for a client to accesses a single server.

As object-oriented languages and techniques have come into vogue, so have client/server systems increasingly moved toward object-orientation. CORBA (Common Object Request Broker Architecture) is an architecture that allows objects within applications -- even objects written in different languages -- to run on separate machines, depending on the needs of a given application. Applications written years ago can be packaged as CORBA services and interoperate with new systems. Enterprise JavaBeans, which is designed to be compatible with CORBA, is another entry into the object-oriented application-server ring.

The purpose of this article is not to provide a tutorial on client/server systems, but it was necessary to provide some background in order to define context. Now let's look at what EJB has to offer.

Enterprise JavaBeans and extensible application servers

Now that we've looked at a bit of history and have an understanding of what application servers are, let's look at Enterprise JavaBeans and see what it offers in that context.

The basic idea behind Enterprise JavaBeans is to provide a framework for components that may be "plugged in" to a server, thereby extending that server's functionality. Enterprise JavaBeans is similar to the original JavaBeans only in that it uses some similar concepts. EJB technology is governed not by the JavaBeans Component Specification, but by the entirely different (and massive) Enterprise JavaBeans Specification. (See Resources for details on this spec.) The EJB Spec calls out the various players in the EJB client/server system, describes how EJB interoperates with the client and with existing systems, spells out EJB's compatibility with CORBA, and defines the responsibilities for the various components in the system.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comments (5)
Login
Forgot your account info?

EJBs overviewBy Anonymous on October 17, 2009, 7:19 amProvided a basic understanding of EJB-s. Details of implementation were missing, though I believe that is out of scope for the article.

Reply | Read entire comment

This is an exelent materialBy M.Nadeem Arif on July 16, 2009, 5:48 amThis is an exelent material for understanding of EJB and its related concepts

Reply | Read entire comment

Tutorial is ExcellentBy Anonymous on May 31, 2009, 6:24 amThis tutorial is very simple and best. It is easily understandable for any beginners.

Reply | Read entire comment

The tutorial helped me understand a lot of conceptsBy Anonymous on May 19, 2009, 3:41 amI had an application written using EJB 2.0 and it seemed really hard to understand before i went through tutorial :)

Reply | Read entire comment

EJBs overviewBy Anonymous on May 11, 2009, 11:54 amExcellent tutorial for begginners.The concepts have been explained very well.Written in a very simplified manner.

Reply | Read entire comment

View all comments

Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources
  • You can find out more about Enterprise JavaBeans in JavaWorld in Bryan Morgan's article "Enterprise JavaBeansComing soon to a server near you." Bryan discusses EJB distributed transactions and CORBA compatibility http://www.javaworld.com/jw-06-1998/jw-06-distributed.html
  • Enterprise JavaBeans was a hot topic at this year's JavaOne. Rich Kadel's JavaOne Today technical coverage of the topic can be found at http://www.javaworld.com/javaone98/j1-98-ejb.html
  • Try your hand at writing your own EJB by following Michael Shoffner's Step by Step column "Write a session EJB" featured in JavaWorld http://www.javaworld.com/jw-07-1998/jw-07-step.html
  • More introductory information about EJB, including a great description of the lifecycle of an EJB, appears in the NC World article "Enterprise JavaBeansIndustrial-strength Java" http://www.ncworldmag.com/ncworld/ncw-01-1998/ncw-01-ejbeans.html
  • Another NC World article covering EJB is "Bean BasicsEnterprise JavaBeans Fundamentals" http://www.ncworldmag.com/ncworld/ncw-04-1998/ncw-04-ejbprog2.html
  • Sun's home page for Enterprise JavaBeans technology can be found at http://java.sun.com/products/ejb/index.html
  • You can download the EJB Specification, all 181 pages of it, at http://java.sun.com/products/ejb/docs.html
  • Java Report Online has a great article by Richard Monson-Haefel that goes into more detail about how to use the EJB API. This article goes into the concepts of developer "roles" that are laid out by the EJB Specification, and provides a good backgrounder for anyone considering tackling the spec itself http://www.sigs.com/jro/features/9803/oldlayout/haefel.html
  • Read Mark Johnson's previous JavaBeans columns http://www.javaworld.com/topicalindex/jw-ti-beans.html