BEA Logo BEA WLCS Release 2.0

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WLCS Doc Home   |   WLCS Components Tour   |   Previous Topic   |   Next Topic   |   Contents   |   Index   |  

Getting Started

 

This section contains the following topics:

Welcome to the WLCS Components Tour!

What the Tour Includes

Requirements

Setting the Stage

The Company

The Opportunity

The Project

The Solution

Reminder about the WebLogic Server SP1

Get Started!

MyBuyBeans.com Architecture

About the MyBuyBeans.com Databases

 


Welcome to the WLCS Components Tour!

WebLogic Commerce Server components are true components: easy-to-use, reusable, customizable, standards-based, and extensible. This tour presents a typical e-Commerce retail scenario and shows how WebLogic Commerce Server components can help you meet the development challenges of such a business scenario. Using the fictitious MyBuyBeans.com retail site as an example, this tour steps you through the entire component development and deployment process.

 


What the Tour Includes

This tour presents a scenario in which BEA WebLogic Commerce Server components are leveraged to quickly and efficiently solve the following common business problem:

Consider an online product catalog. It is filled with items that have different descriptions, identifiers, and prices. Because many items have different attributes, they need to be stored differently. However, items do share some common attributes. Now imagine adding a new line of product with new features, attributes, and pricing schemes to the catalog. It is in a case like this where customizability and extensibility play big roles. Enter BEA WebLogic Commerce Server!

We begin by leading you through a design process in which you use Rational Rose to extend two WebLogic Commerce Server components: Item and ItemPriceCalculationPolicy.

Next, we show you how to implement the design. This includes exporting the model, generating EJB source code for the WebLogic Commerce Server components, and adding custom business and presentation logic.

Finally, you will deploy the newly extended WebLogic Commerce Server as a solution to the stated business problem.

 


Requirements

In order to understand the tour, you should be familiar with the following concepts and technologies:

Additionally, we assume you have a Java compiler and Rational Rose installed on your Windows 98/NT machine.

 


Setting the Stage

The Company

Beans & Company is a regional powerhouse in beans. For more than a decade they have expanded their catalog business to include virtually every variety of bean. They have accomplished this through acquisition of other bean-related businesses. Aggressive marketing strategies have successfully positioned Beans & Co. to expand into the global marketplace!

The Opportunity

It is time for Beans & Company to live up to its sales potential and deliver value to its investors. To reach these goals they need to streamline their operations and quickly reach a worldwide audience. They have leading technology and a skilled technical staff. Now, they must leverage these capabilities across all of their separate business units, and deliver a unified brand image to the consumer.

The Project

Senior management has asked their technical staff to deliver a presence on the Internet. The new site must give customers access to the complete product line. To meet the expected demand, the system must be tightly integrated with the existing logistics and accounting capabilities. To minimize risk and meet the deadline, they need to use their own in-house technical and operations staff.

The Solution

Using enterprise integration, Beans & Co. is able to combine their disparate existing systems with the new technology they need. They are also able to deliver a cohesive presentation to consumers. The technology, Enterprise Java Beans, is being aggressively adopted across all the distinct platforms on which their systems run.

Beans & Co. is using BEA WebLogic Commerce Server. BEA is showing Beans & Co. the power of this new technology. New business and presentation logic is being developed using BEA components. Special implementations are being created to interface with the existing shipping, inventory, and billing systems. They are even able to leverage their extensive customer database and product catalogs.

 


Reminder about the WebLogic Server SP1

Before you start the WebLogic server and use the demonstration software described in this document, you must add three WebLogic Server 5.1 Service Pack 1 (SP1) files to your CLASSPATH. The files are either included in the installed WebLogic Commerce Server directory, or you can download them from the BEA Download site. The SP1 JAR files are:

If you do not see these files in a WLCS software directory, please start at the following Web address: http://www.bea.com/download.html and follow the links to the WebLogic Server download page.

Once the files are in a directory on your system, add them to your CLASSPATH. Note that these files must be present before any other items in your CLASSPATH.

 


Get Started!

Now that you have installed WebLogic Server 5.1 with SP1 and WebLogic Commerce Server, it's time to get started with the demonstration software.

Now that you are really impressed, you will want to find out how we did it. Of course this site was made possible by our WebLogic Commerce Server components! The site also uses industry-leading technology like the WebLogic application server and Cloudscape database. We have installed evaluation copies of these products to support this demo and to show you how powerful they are.

We also include Deployment Sets for leading relational databases using a BEA implementation for bean-managed persistence. For details, see the Deployment chapter in the document WebLogic Commere Server Components Developer's Guide.

The rest of this tour takes you through the process of implementing the WLCS Components solution!

 


MyBuyBeans.com Architecture

MyBuyBeans.com is an n-tier distributed system entirely built using BEA WebLogic technology. The system consits of a client front-end, a middle tier of WebLogic Enterprise JavaBeansTM (EJB) components, and a back-end database. The middle tier also contains the BEA WebLogic Portal framework and Personalization engine. All components of the middle tier run within an instance of the BEA WebLogic Application Server.

Customers access MyBuyBeans.com using a HTML Web browser. The Web browser uses HTTP to connect to a set of Java Server Pages (JSP) on the application server. A JSP consists of static HTML and embedded Java code that generates dynamic HTML contents. When accessed for the first time, each JSP is compiled by the WebLogic Application server into a Java Servlet. The output of the Java Servlet is the static HTML contained in the JSP along with the dynamic HTML that is generated by the execution of the embedded Java code.

The use of JSPs both simplifies and streamlines the process of dynamic HTML generation. It allows a Web designer to design and implement a Web page using the normal HTML design tools that he or she is familiar with, while at the same time, freeing an Application developer to embed the necessary Java code for the dynamic content of the page. The JSP source is provided so that you can get a feel for just how easy it is to use and modify.

Using the embeded Java code found in the JSP, the generated Servlets make calls to presentation logic written in Java. The MyBuyBeans.com presentation logic is written as a set of Java classes. These classes encapsulate data access to the middle tier of WebLogic Components, thus making the JSPs simpler and easier to maintain. The presentation logic objects use the Java Naming and Directory Interface (JNDI) to locate the appropriate WebLogic Components. Once a reference is obtained to a WebLogic Component, it can be used as if it were a local resource.

At the heart of the system are WebLogic Commerce Server, a set of 80 EJBs that provide most of the functionality of essential e-business. These beans run inside an "EJB Container" on the application server and expose the MyBuyBeans back-end systems. Since the components can be found using the Java Naming and Directory Interface (JNDI), the can be accessed from anywhere on the network. To simplify delivery of this demonstration, all of the components and servlets are running together in one instance of WebLogic Server. When deploying this application on an enterprise level, the various components will run on different machines and, potentially, on different architectures.

MyBuyBeans.com uses both Session and Entity WebLogic Components. Component access to the MyBuyBeans back-end is facilitated by the WebLogic Application Server which provides a JDBC connection pool to the MyBuyBeans database. The Entity beans in this application use "container-managed" persistence. This means that WebLogic Server manages storing the contents of an Entity EJB to the database when the bean's persistable attributes change. The demo MyBuyBeans.com application uses a Cloudscape database. The database is lightweight, and runs embedded within the WebLogic Server, so we do not need to start it separately.

MyBuyBeans.com uses the concept of pluggable methods to set up pricing policies for its products and to calculate the prices based on these policies. Three ItemPriceCalculationPolicies are used, each holding business logic specific to the pricing of a different class of Items. We have included the UML diagram and documentation for these items and their pricing policies.

In addition to the WebLogic Components, MyBuyBeans.com takes advantage of the features of the WebLogic Portal framework and WebLogic Personalization engine. The WebLogic Portal framework allows an Internet portal site to be quickly assembled from a collection of portlet applications. Additionally, the Portal framework provides mechanisms for portal administration and user personalization. Portlet applications (also referred to as Portlets) are JSP and HTML pages that present dynamic content in a portal application. The content is laid out in the portal page by the Portal framework according to a user's personalized information as stored by the WebLogic Personalization Server.

Just so you don't think that this is browser-only technology, we have also created a back-office administration application implemented as a standalone Java application. This application provides a unified interface to commonly performed tasks at MyBuyBeans.com (such as managing the item catalog, or dealing with trouble tickets from customers). This application accesses remote objects directly to accomplish its goals.

 


About the MyBuyBeans.com Databases

The MyBuyBeans.com application can use a Cloudscape database or an Oracle database.

The Cloudscape database is lightweight, and runs embedded in the application server, so you don't need to start it separately. As you run the application, it is important to keep in mind that because this evaluation version of Cloudscape supports database-level locks only, it handles only a single user. While the Cloudscape database is locked by one user, another user does not have access to the database.

The MyBuyBeans.com database contains the following tables corresponding to the beans deployed for the MyBuyBeans application:

T A B L E N A M E S

ALPHANUMERICSEQUENCER

ITEM

BASICBEAN

ITEMINVENTORY

BEANIEBABY

ITEMQUALITIES

BUSINESSSMARTWORKAREA

ITEMSBYQUALITY

COFFEEBEAN

JELLYBEAN

CUSTOMER

MAILBOX

CUSTOMERPROFILE

PACKINGLIST

EBUSINESSSESSION

SHIPPINGMETHOD

INVENTORYRECORD

TORDER

INVOICE

TROUBLETICKET

The following examples assume that WL_Commerce_Home is the directory in which you installed the WebLogic Commerce Server software.

To create the database tables, run the WL_Commerce_Home\db\Oracle\BuyBeansOracle805.sql file, or the WL_Commerce_Home\db\Cloudscape\BuyBeansCloudscape (.bat or .sh) procedure.

With the WebLogic server running, run the DataLoader procedure (.bat or .sh) to populate the databases.

To run DataLoader.bat on NT systems, use:

WL_Commerce_Home\bin\win32\DataLoader.bat

To run DataLoader.sh on Solaris 7 systems use:

WL_Commerce_Home/bin/solaris2/win32/DataLoader.sh

The procedure will populate the database with all the items for the application. The database is ready to run after you complete these steps. You can now add users and other data by using the WebLogic Personalization Server Administration Tools.

If you make any structural changes to the MyBuyBeans database, you will need to make the appropriate changes in the deployment descriptor of the particular beans. Sample XML deployment descriptor files already exist for the MyBuyBeans tour. See the following files that reside under the WL_Commerce_Home/src/examples/buybeans/tour/Meta_Inf directory: