Corporate Info | News | Solutions | Products | Partners | Services | Events | Download | How To Buy
Commerce Servers Doc Home | WebLogic Components Doc Home | Using WebLogic Components | Previous Topic | Next Topic | Contents

My BuyBeans.com Example

This Demo includes the following sections:

- Beans & Co. Scenario

- Get Started!

- My BuyBeans.com Architecture

- About the My BuyBeans.com Database

- Introduction to the Hands-On Technical Tour

Beans & Co. Scenario

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 Components. 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.

Get Started!

Now that you have installed WebLogic Components, you have everything you need to get going.

- First you will want to start the WebLogic application server.

- Next you will want to connect to the site. (You can login with username cool and password bean, or register a new user and shop!)

- You can run our Java based Admin Client to manage the site and get a behind the scenes look. (Login and Password fields should be empty.)

Now that you are really impressed, you'll want to find out how we did it. Of course this site was made possible by our WebLogic 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 BEA own Bean Managed Persistence. See Deploying WebLogic Components Using Bean-Managed Persistence, for information on how they work for Oracle and the Solaris platform.

To learn more about the technology and the tools, please see References.

My BuyBeans.com Architecture

My BuyBeans.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 JavaBeans (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 My BuyBeans.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 My BuyBeans.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 Components, 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 My BuyBeans 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.

My BuyBeans.com uses both Session and Entity WebLogic Components. Component access to the My BuyBeans back-end is facilitated by the WebLogic Application Server which provides a JDBC connection pool to the My BuyBeans 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 My BuyBeans.com application uses a Cloudscape database. The database is lightweight, and runs embedded within the WebLogic Server, so we don't need to start it separately. We have provided documentation on the database schema and how it is used by My BuyBeans.com.

My BuyBeans.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, My BuyBeans.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 applicaitons. 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 engine. My BuyBeans.com is a portal application consisting of 15 portlets.

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 My BuyBeans.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 My BuyBeans.com Database

The My BuyBeans.com application uses a Cloudscape database. The 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 table-level locks only, it handles only a single user. While a table is locked by one user, another user does not have access to the same table. Concurrent access by multiple users may cause deadlocks and corrupt the Cloudscape database.

The My BuyBeans.com database contains the following tables corresponding to the beans deployed for the My BuyBeans 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

Run the itemloader.sh and shippingmethodloader.sh to load the data into database.

Note: Examples assume all directory strings are relative to the Weblogic Components install directory (WEBLOGICAC_HOME ).

To run itemloader.sh , use:

>     bin/solaris2>sh itemloader.sh -url http://hostname:7601 -tabdelimitedfile WEBLOGICAC_HOME/deploy/weblogic/oracle8x/misc/BuyBeans.txt

To run shippingmethodloader, use:

>     bin/solaris2>sh shippingmethodloader.sh -url http://hostname:7601 -commadelimitedfile WEBLOGICAC_HOME/deploy/weblogic/oracle8x/misc/shippingmethods.txt

Note: If you make any structural changes to the My BuyBeans database, you will need to make the appropriate changes in the deployment descriptor of the particular beans. These files reside under the src directory for each bean in a deployment folder and are named <BeanName>DD.txt .

Note: The instructions on this page are for Solaris. For a Windows-based system, use the same commands from the command line (i.e., the same syntax):

instead of

bin/solaris2> sh XXX.sh ,

run

bin/win32> XXX.bat .

Introduction to the Hands-On Technical Tour

The ultimate learning tool is a working application -- and we've provided a way for you to see how it all fits together. BEA WebLogic Components Technical Tour takes you through the entire development process of extending the My BuyBeans.com site with a custom item.

The tour contains detailed information on each of the tools that you need to create your own WebLogic Components extensions, including the SmartGenerator WebLogic Components generation tool. For more information about the SmartGenerator and UML modeling, you can also refer to Modeling with WebLogic Components.

To find out more about our packages and descriptions for each of the components, see the Bean Catalog or the complete API.

Any more questions? Try the Frequently Asked Questions (FAQ).

If you would like more information about Enterprise Java Beans and their inner workings, the best place to go is straight to the EJB Specifications on Sun's web site.

Copyright © 2000 BEA Systems, Inc. All rights reserved. Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.