In business, global competition and the increased pace of change demand rapid deployment of highly adaptable systems. The organizational boundaries that have traditionally constrained applications are giving way to the opportunities inherent in electronic commerce and networked operations. Today, the geography of an application can extend far beyond an organization's boundaries, literally into consumers' homes. It is possible to think of an Internet application needing to handle literally millions of users a scale difficult to imagine a few years ago.

Most companies have not taken full advantage of multi-tiered (n-Tier) architectures. The guiding principles of distributed multi-tiered architectures like J2EE and .net / Windows DNA are: Web computing; faster time to market; true interoperability; Scalability, reduced complexity; language, tool, and hardware independence; and lower cost of ownership.

SoftAMIS provides global offshore J2EE development and dedicated outsourcing services. J2EE is a platform introduced by Sun Microsystems that allows you to develop robust and scalable applications. J2EE is a mix of server side java based technologies and is intended for middleware platform.

The J2EE platform offers:

  • A multi-tiered distributed application model
  • The ability to reuse components
  • Integrated Extensible Markup Language (XML)-based data interchange
  • A unified security model
  • Flexible transaction control.

Using J2EE is not only possible to deliver innovative customer solutions to market faster than ever, but platform-independent J2EE component-based solutions are not tied to the products and application programming interfaces (APIs) of any one vendor. Vendors and customers enjoy the freedom to choose the products and components that best meet their business and technological requirements.

Normally, thin-client multi-tiered applications are hard to write because they involve many lines of intricate code to handle transaction and state management, multithreading, resource pooling, and other complex low-level details. The component-based and platform-independent J2EE architecture makes J2EE applications easy to write because business logic is organized into reusable components. In addition, the J2EE server provides underlying services in the form of a container for every component type. Because you do not have to develop these services yourself, you are free to concentrate on solving the business problem at hand. J2EE is a robust suite of middleware services that make life very easy for server side application developers.

J2EE offers set of Middleware Software Services:

  • Remote Method Invocation: Logic that connects a client and server via a network connections.
  • Load Balancing: Client must be directed to the server with the lightest load. If one server is overloaded the requests are redirected to least burdened server.
  • Transparent fail-over: If a server crashes or if the network crashes the requests are redirected to other servers without any interruption.
  • Back-end Integration: The business data can persist in the newly designed database or can be hooked up with the legacy system
  • Transactions: To maintain the data integrity. The same view is available to all the clients.
  • Dynamic Upgrades: Upgrading the application while the server is still running.
  • Logging and Auditing: To locate the problem and to determine its cause.
  • Object Pooling and Recycling: Objects need to be created or destroyed in sync with the client traffic.
  • Resource Pooling: If some of the server resources are not tied up to servicing clients that can be returned to the pool for reuse by other clients.
  • Security: Protecting your server and database from the saboteurs.

The J2EE platform uses a multi-tiered distributed application model. Application logic is divided into components according to function, and the various application components that make up a J2EE application are installed on different machines depending on the tier in the multi-tiered J2EE environment to which the application component belongs. Although a J2EE application can consist of the three or four tiers, J2EE multitiered applications are generally considered to be three-tiered applications because they are distributed over three different locations: client machines, the J2EE server machine, and the database or legacy machines at the back end. Three-tiered applications that run in this way extend the standard two tiered client and server model by placing a multithreaded application server between the client application and back-end storage.

J2EE applications are made up of components. A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and that communicates with other components.

J2EE components are written in the Java programming language and are compiled in the same way as any program in the language. The difference between J2EE components and standard Java classes is that J2EE components are assembled into a J2EE application, verified to be well formed and in compliance with the J2EE specification, and deployed to production, where they are run and managed by the J2EE server.

A J2EE client can be a Web client or an application client. A Web client consists of two parts: dynamic Web pages containing various types of markup language (HTML, XML, and so on), which are generated by Web components running in the Web tier, and a Web browser, which renders the pages received from the server.

A Web client is sometimes called a thin client. Thin clients usually do not do things like query databases, execute complex business rules, or connect to legacy applications. When you use a thin client, heavyweight operations like these are off-loaded to enterprise beans executing on the J2EE server where they can leverage the security, speed, services, and reliability of J2EE server-side technologies.

A J2EE application client runs on a client machine and provides a way for users to handle tasks that require a richer user interface than can be provided by a markup language. It typically has a graphical user interface (GUI) created from Swing or Abstract Window Toolkit (AWT) APIs, but a command-line interface is certainly possible.

Application clients directly access enterprise beans running in the business tier. However, if application requirements warrant it, a J2EE application client can open an HTTP connection to establish communication with a servlet running in the Web tier.

The server and client tiers might also include components based on the JavaBeans component architecture (JavaBeans component) to manage the data flow between an application client or applet and components running on the J2EE server or between server components and a database. JavaBeans components are not considered J2EE components by the J2EE specification.

JavaBeans components have instance variables and get and set methods for accessing the data in the instance variables. JavaBeans components used in this way are typically simple in design and implementation, but should conform to the naming and design conventions outlined in the JavaBeans component architecture.

Various elements can make up the client tier. The client communicates with the business tier running on the J2EE server either directly or, as in the case of a client running in a browser, by going through JSP pages or servlets running in the Web tier.

Your J2EE application uses a thin browser-based client or thick application client. In deciding which one to use, you should be aware of the trade-offs between keeping functionality on the client and close to the user (thick client) and off-loading as much functionality as possible to the server (thin client). The more functionality you off-load to the server, the easier it is to distribute, deploy, and manage the application; however, keeping more functionality on the client can make for a better perceived user experience.

J2EE Web components can be either servlets or JSP pages. Servlets are Java programming language classes that dynamically process requests and construct responses. JSP pages are text-based documents that execute as servlets but allow a more natural approach to creating static content.

Static HTML pages and applets are bundled with Web components during application assembly, but are not considered Web components by the J2EE specification. Server-side utility classes can also be bundled with Web components and, like HTML pages, are not considered Web components.

Like the client tier, the Web tier might include a JavaBeans component to manage the user input and send that input to enterprise beans running in the business tier for processing.

Business code, which is logic that solves or meets the needs of a particular business domain such as banking, e-commerce, retail, or finance, is handled by enterprise beans running in the business tier. This figure shows how an enterprise bean receives data from client programs, processes it (if necessary), and sends it to the enterprise information system tier for storage. An enterprise bean also retrieves data from storage, processes it (if necessary), and sends it back to the client program.

The J2EE platform is a platform-independent, full systems integration solution that creates an open marketplace in which every vendor can sell to every customer. Such a marketplace encourages vendors to compete, not by trying to lock customers into their technologies but by trying to outdo each other by providing products and services that benefit customers, such as better performance, better tools, or better customer support.

The J2EE APIs enable systems and applications integration through the following:

  • Unified application model across tiers with enterprise beans
  • Simplified response and request mechanism with JSP pages and servlets
  • Reliable security model with JAAS
  • XML-based data interchange integration with JAXP
  • Simplified interoperability with the J2EE Connector Architecture
  • Easy database connectivity with the JDBC API
  • Enterprise application integration with message-driven beans and JMS, JTA, and JNDI