Online Auction scenario - overview
(UML visualization for J2EE - Technical Preview Edition)

J2EE applications

Although many organizations continue to use Web-centric e-business applications, these applications are limited and must often be re-engineered if they are called upon to perform more complex tasks. For this reason, many organizations have elected to build multi-tiered Java(TM) 2 Platform, Enterprise Edition (J2EE) applications, which are scalable, transactional, extensible, and secure. J2EE application components are separated into presentation, logic, and data layers. This enables organizations to reuse more code, which saves them time and money. J2EE applications can also help organizations provide customers with consistent, timely and convenient access to Web services. And organizations can use J2EE applications to leverage new Web and wireless technologies, which opens up new market opportunities.

EJB technology is the framework on which the J2EE specification is based. It is used to develop and deploy enterprise beans, which are server-side software components that contain an application's business logic. Applications developed using EJB technology generally consist of multiple tiers and include the following application elements:

The following figure shows a typical multi-tiered topology for an EJB application:

Figure of a multi-tiered EJB application consisting of a client, a web container, an EJB container, and a database.

J2EE applications provide many advantages in addition to their scalability. For example, they enable you to do the following:

Even small businesses can benefit from the many advantages of using EJB technology in their e-business applications. And if their business grows, their EJB applications can easily accommodate the growth where other types of applications might eventually prove inadequate.

The Online Auction sample application

By following the instructions in this document, you learn how to use WebSphere(R) Studio by building an Online Auction sample application and running it in a J2EE-compliant server environment. As the name implies, the sample application features an auction Web site, where you can browse auction items, submit items for sale, and bid on items. To save you time, a number of application components are already provided for you, such as images and code fragments that you can copy and paste into existing source code. This enables you to focus on learning WebSphere Studio rather than spending your time performing the more tedious tasks associated with developing an application.

Since the online auction sample application employs J2EE technology, it features a wide variety of application components, such as Java beans, JDBC, HTML, JavaScript(TM), servlets, JSP pages, GIF files, and enterprise beans. You can develop or enhance all of these component types using WebSphere Studio, which provides multiple application development tools, such as local and remote environments that are based on WebSphere Application Server. The Online Auction sample application complies to the J2EE 1.3 specification, using EJB 2.0 beans. To develop this application, you will use the EJB tools, the Server tools, and the CVS team environment. The application consists of business logic contained in enterprise beans that access a database and presentation logic provided by various Web resources.


Picture of the Auction Web site.

The user opens the Auction Web site (index.jsp) in a browser. The user selects a category of auction items, which sends a request to the Web server and returns a JSP page (FloralResults.jsp). To sell an item, the user selects "sell" from the navigation bar. This opens the sale form (Sell.jsp). The user then enters the values for the item for sale. The user submits the form and the data is transmitted to the database (dreamauc) via the create method of the session bean (ItemHelper). The Floral page reopens displaying the name of the item the user registered in the auction. To bid on an item, the user selects the desired item and opens a bid form (FloralDetails.jsp). The user enters a name and bid amount and submits the form. The makebid method of the session bean makes the bid and registers the bid in the auction. The Web server refreshes the page and displays the new bid (FloralResults.jsp). To search the site for items by price, the user enters a price in the search field. The findByValue method of the session bean searches the database for items in that price range and updates FloralResults.jsp with those items.

Although you can walk through the Online Auction sample application without any prior experience with WebSphere Studio, you will find it helpful to browse the Getting Started book before working with the sample application. You can find a link to Getting Started in the online help for the WebSphere Studio development environment that you have installed.This will give you a basic familiarity with WebSphere Studio. If you need detailed information about any of the WebSphere Studio tools, you can also consult the WebSphere Studio online help.

To work with the Online Auction sample application, you complete one or both of the following activities:

Before you can perform either of these activities, you must complete the tasks in the topic "Preparing for the Online Auction sample application".