New York University

Computer Science Department

Courant Institute of Mathematical Sciences

 

Is EJB Right for Me?

 

Course Title: Application Servers                                           Course Number: g22.3033-011

Instructor: Jean-Claude Franchitti                                            Session: 6

 

Enterprise JavaBeans (EJB) is the server-side component-based middleware architecture for Java. The specification, led and driven by Sun with participation from many key industry vendors, aims at uniting application server vendors to support a standard architecture to make business applications not only platform independent, but vendor independent.

EJB is intended for complex distributed systems that use a purchased application server to handle the ‘plumbing’, or low-level network and transactional workload. Encapsulation and separation of the services layer from the application layer allows application developers to focus on solving business problems.

The following table looks at the pros and cons of an EJB solution based on specific business and system attributes.

 

Business Problem Attribute

Yes

No

q       Distributed across multiple machines.

Since EJB is distributed, applications are easily deployed across several machines.

EJB is inappropriate for applications that will run on a single machine.

q       Distributed across multiple platforms.

EJB applications can be deployed on a variety of platforms. For example, the application could be developed with NT and deployed with UNIX.

There is no drawback to EJB if a single platform is required.  However, for applications that will run solely on Microsoft platforms, a COM+ solution should be considered.

q       Integrates existing legacy code.

EJB and Java are particularly suited to work with CORBA applications, and the Java Native Interface can be used to integrate with legacy applications. Several leading Enterprise Application Integration vendor packages also work well with EJB. Consult a Java expert to be sure existing code can be integrated.

There is no drawback to EJB if no legacy code must be integrated.

q       Performance is a top priority.

EJB applications are usually slower than well-architected non-Java applications that are optimized for speed.

EJB is an excellent solution in cases where time-to-market and componentization are higher priorities than top performance.

q       Time-to-market is a top priority.

If experienced Java developers are available for the project, EJB applications can be developed with unprecedented speed.

There is no drawback to EJB if time-to-market is not a top priority.

q       Component reuse is a top priority.

Since EJB is a component-based architecture, it is well suited for large applications that will benefit from a high level of reuse.

There is no drawback to EJB if component reuse is not a top priority.

q       Java developers available for team.

EJB is particularly well suited for companies with developers already trained in Java. This is not an issue if no development or maintenance is expected to take place in-house.

Recognize that developers not trained in Java will have the added learning curve of a new language if any development or maintenance is expected to take place in-house. Transition to Java is easiest for C++ developers.

q       Java is a company-wide initiative.

Companies that have already moved towards Java as an enterprise solution will want to take advantage of the time-saving features and broad industry adoption of EJB.

If Java is not considered a priority in the company, other component technologies should be assessed alongside EJB.

q       Horizontal scalability (e.g. achieving performance requirements by adding machines to the work force) is a top priority.

EJB applications are easily scaled up horizontally. Consider this point when comparing different application servers available.

Because of the way Java works, it may be less vertically scalable (e.g. achieving performance requirements by increasing horsepower on a single machine) than other technologies. Some application servers can work around this issue.

q       Requires browser front end.

Because of the web integration built into EJB application servers, EJB is particularly well suited for applications that require a browser front-end.

While most EJB application servers can be accessed by the latest Java GUI technologies, most are centered on a browser interface. Java windowing interfaces frequently feel less responsive to the user than platform-specific GUI technologies.

q       Acceptable risk level is extremely low.

Because of the comparative immaturity of EJB and the application servers that support it, EJB does introduce an added level of risk not associated with other more proven technologies. Currently, EJB may be best suited for projects with more flexible boundaries.

There is no drawback to EJB for projects that have a reasonable level of acceptable risk.

q       Current technology is very Microsoft-centered.

If all current technology is implemented using ASP and COM, for instance, consider whether moving to EJB is a broad initiative. While it is not impossible to integrate ASP and EJB web applications, it may add extra complexity.

Java is well suited for integration with non-Microsoft technologies such as CORBA and XML.

q       Application functionality will start small, but grow with time. Or application will undergo iterative development.

EJB is well suited for this type of application. Components allow functionality to be added or changed more easily.

There is no drawback to EJB if the application is expected to remain fixed over time.