Professional Java 2 Enterprise Edition with BEA WebLogic Server

Professional Java 2 Enterprise Edition with BEA WebLogic Server

3.0 3
by GOMEZ, Peter A. Zadrozny
     
 
Technology Overview

The Java 2 Enterprise Edition (J2EE) specification is one of Java's success stories; a standard for enterprise web application development that has wide industry support.

J2EE is basically a collection of specifications for web services, business objects, data access, and messaging. They define the way in which web applications

Overview

Technology Overview

The Java 2 Enterprise Edition (J2EE) specification is one of Java's success stories; a standard for enterprise web application development that has wide industry support.

J2EE is basically a collection of specifications for web services, business objects, data access, and messaging. They define the way in which web applications communicate with the servers that host them. J2EE focuses on two things - creating a standard that allows web applications to be portable between servers, and giving the server control of component lifecycle and other resources, in order that it can handle issues of scaling, concurrency, transaction management, and security.

This book is based around one of the most popular J2EE and EJB implementations, BEA WebLogic Server. The authors work for BEA in Europe, providing technical support for customer's implementations of Weblogic-based solutions. They have first-hand knowledge of the practical difficulties developers face in applying J2EE and WebLogic to their projects, and in debugging and testing these applications. This book is a distillation of their real-world expertise.

Who is this book for?

This book is for professional Java developers who want to see the development of a full J2EE example and its configuration and deployment on BEA WebLogic Server. Coverage of the APIs involved, reasoning behind the architecture decisions made, and how the example is tested, is included.

Java knowledge is assumed, as is a basic tutorial understanding of the J2EE APIs. Some experience of enterprise level / web application programming is expected.

What does this book cover?

  • Moving a client/server app to the web using J2EE APIs
  • Interfacing multiple front ends to the underlying business logic
  • How to create business logic components with Enterprise JavaBeans
  • Using Java Message Service for reliable and broadcast messaging
  • WebLogic Server-specific programming and configuration detail
  • Security concerns for an e-commerce site
  • The Grinder, a stress-tester for web applications
  • Results of stress-tests compare application architectures under different loads
  • Full working example developed and tested in the book

Peter Zadrozny and Francisco Gomez work for BEA in Europe, providing technical support for customer's implementations of Weblogic-based solutions. They thus have first-hand knowledge of the problems developers face in applying WebLogic, EJBs and in tuning, debugging and testing these applications.

Product Details

ISBN-13:
9781861002990
Publisher:
Apress
Publication date:
10/01/2000
Series:
Programmer to Programmer Series
Edition description:
2000
Pages:
509
Product dimensions:
(w) x (h) x 0.04(d)

Read an Excerpt


1. Webifying Applications

E- and M-Commerce, the Intranet, the Extranet, the Web, Business-to-Consumer and Business-to-Business - the buzzwords of the moment, grouped under the umbrella term, the Internet, are the hot stuff, a much-hyped revolution that is changing the way business is conducted and how people communicate. In this chapter, we'll take a high-level view of the Internet, including:

  • Evolution of Internet applications
  • What the Java 2 Enterprise Edition (J2EE) provides
  • How BEA WebLogic Server implements J2EE
  • An overview of the functional architecture of a web application

    The Internet continues to grow in leaps and bounds (it follows an exponential curve), as more people arrive at the conclusion that they cannot escape it and that in order to keep up, they must participate. Not only is the Internet fashionable but it does promise to improve the productivity and competitiveness of the people that use it. The Internet is bigger than the sum of its parts and is definitely a force that has to be dealt with.

    Over the years, more and more corporations have been using the Internet to enable what can be termed business-to-consumer (B2C) e-commerce. Most have followed the following route:

  • Phase 1: Internet presence - "We are on the Internet"
  • Phase 2: Provide information - "You can do queries"
  • Phase 3: Receive information - "You can do updates"

    These can also be characterized as the provision of static content, dynamic content, and then the use of web-enabled applications.

    We're on the Internet

    Usually the way that this first phase happened was that some corporate boss learned about the Internet from their children and realized that they had to be on it. More recently, the buzzwords have been omnipresent in the media and it is difficult for anyone to watch TV, listen to the radio, or read a newspaper without coming across a mention of the Internet.

    The rush starts with trying to get the name of the corporation reserved in order to be able to have the precious .com trophy. This is not always a successful exercise for various reasons, but it does lead to very interesting and creative ways of representing the corporation with a .COm name when the true name is not available.

    The next step in this phase is to find the materials that make up the corporation brochures and either retype them or save them as an HTML file. Throw all this stuff onto a web server, add connectivity to the Internet and voila you are on the Internet. Now the bosses have something to talk about at cocktail parties for the next few weeks. But just like Chinese food, they will want more after a little while. The pressure starts building again and the Chief Information Officer can no longer justify not doing more. Things conspire to take us to Phase 2...

    You Can Do Queries

    Even though the Management Information System departments deal with technology on a daily basis, typically they will be hesitant to quickly rush into implementing new technology. Most, being rather conservative will find a pilot project with which to experiment with these new things. The favorite application is the internal telephone directory (after all the PC at the reception has to be justified). So once again a developer is thrown on the project and after a few weeks the result is that the corporation has now really entered the Internet age with its web-based telephone directory.

    As another example, many retailers in their early web presence offered a store locator (enter your zip code and it finds the nearest store to you).

    Given the spectacular success of the initial project, the next step is to seriously consider making more information available to customers over the Internet. Most of the time corporations have some sort of customer service and a toll-free telephone number. Typically the customer service representative acts as a go-between between the customer and a computer application. These are the favorite applications to web-enable. Some of the information that is available from the existing application will be given a web front end in such a way that the customers can now access this information from their web browser. This information can change over time, so dynamic generation of the HTML page for a topic when it is requested, is a big change.

    At this stage most of the MIS departments struggle with security issues that range from access via a login and password combination to the use of Secure Socket Layer (SSL) to secure web communications. Query types can be as simple as retrieving a specified document all the way to getting a bank statement, but the bottom line is that at this stage the functionality is limited to queries only, that is, the information flows only from the corporation to the consumer.

    As you can imagine, this phase not only has the complexity of interacting with existing applications, but also the challenge of creating a simple, consistent web front end that allows consumers to interact with these systems intuitively. More then a technical challenge, this is a sociological and human engineering challenge. Sadly though, too many of these decisions are made by programmers whose concept of ease of use is rather different from that of their target audience.

    You Can Do Updates

    As the developers get more familiar with the technologies and more comfortable with the kind of information they are willing to share with their customers on the Internet, the next natural step is that of allowing 'customers' to update information. Those customers can be employees on the road, trusted clients, or the general public.

    This may involve changes to business processes and applications, but the Internet paves the way for bidirectional relationships, a two way street that allows the corporation to have a truly personalized relationship with its customers. By updates we understand the ability of the consumer to insert and/or modify information in the data store of the corporation.

    This process is what we call 'webifying' an application. You take an existing application and you create an additional front end using web technology that allows people to interact fully with an existing application. Examples of this can be as simple a request as a change of address, to a full airline reservation system.

    The intuitive web front end in this phase is (we hope) the province of Human Computer Interaction (HCI) specialists, rather than the developers. The separation of presentation from content and programming is one of the big issues in current web application development, and is a subject we'll return to later.

    There is one type of e-commerce that does not necessarily require a suitable front end - business-to-business (MB) interaction. Generally in B2B the customer or consumer of the applications is a trained professional in the subject matter and the concentration is on efficiency and not necessarily simplicity. In some B2B applications there is no interaction between humans and applications, but instead between applications. For example, an inventory system can automatically generate purchase orders that are then sent (via the Internet) to the provider's order processing application. However this is not the focus of this book, which will be looking chiefly at business-to-consumer (B2C) web applications.

    The Exception - Newborn Businesses

    Not everybody has the bad luck (or good fortune, it all depends) of having to base their business on existing applications. Some are fortunate enough to be able to design their systems from scratch specifically for their use on the Internet. The new generation of .Corn companies is the obvious example, but any young company without legacy systems can fall into this category.

    They have the opportunity to develop their applications with only one user interface in mind, the Internet, without intervening development phases. After all, without a fully interactive, working web site, what use is Internet presence and PR to a .corn company? As these companies are younger and bolder they are more willing to risk it into the use of new technology and concepts, whereas their counterparts in the corporate world traditionally are more conservative. In general these newborns are the ones that have driven the evolution of the web technology, which will be reviewed now.

    Evolution of Web Applications

    In order to understand the way web applications have developed to date, let us quickly summarize the problems with a web application, and how these problems have been solved historically, before looking at the solution offered by Java 2 Enterprise Edition.

    Web applications are different from ordinary applications in the following ways:

  • Your application can have millions rather than thousands of customers, and many more simultaneous clients than in normal client-server systems. Scaling your application is a big problem, and this isn't going to go away, as the Internet expands (and extends to mobile phones).

  • HTTP is a stateless protocol, which doesn't have the concept of a client session (conversational state between client and server). You have to add this in to support browsing and adding to an order, for example.

  • The key to web success is provision of dynamic data on rapidly developing sites. Managing this, as a developer and a sys-admin, can be a headache.

  • Transactions and security are needed for purchases online. The Internet is a public network, and that makes authorization, authentication and encryption critical.

  • Impersonal as the web interface appears to be, you can and must make your customers feel welcome, perhaps personalize their view of the site information, and otherwise help them find what they want. Otherwise, the competition is just a click away.

    Web application development is a hybrid of client-server development, with a thin client communicating using HTTP, web content that is dynamically generated according to the client's request, and a central data server.

    Web applications can be seen as going through three generations during their evolution...

  • Meet the Author


    Peter Zadrozny and Francisco Gomez work for BEA in Europe, providing technical support for customer's implementations of Weblogic-based solutions. They thus have first-hand knowledge of the problems developers face in applying WebLogic, EJBs and in tuning, debugging and testing these applications.

    Customer Reviews

    Average Review:

    Write a Review

    and post it to your social network

         

    Most Helpful Customer Reviews

    See all customer reviews >

    Professional Java 2 Enterprise Edition with BEA WebLogic Server 3 out of 5 based on 0 ratings. 3 reviews.
    Guest More than 1 year ago
    If you buy this book then you are in same situation where you took a position to maintain a application which is a very well written by a expert programmer but with very bad documentation, and unfortunately he has left the company. So if you are already a J2EE and WebLogic expert and just like to fill the missing links for fun, then this book is for you.
    Guest More than 1 year ago
    Except the chapter on the load testing (chapter 11 )There is noting worth for some one lookng for some performace tips.infact whole of the book is written for novice users of weblogic.there is nothing much for an experienced dev.
    Guest More than 1 year ago
    Kudos to Paco and Peter for such a useful book on WebLogic. I received it yesterday and couldn't put it down. If you are doing anything with WebLogic you definitely need this book. You will especially like the load testing section in Chapter 11 where different VMs and Bean types are compared side by side. The Chapter on Clustering was worth the price of admission all by itself. Interestingly, here at the Xylo, we were dealing EJB deployment issues, so after showing this book to my manager he is practically making it required reading. I was a little skeptical when purchasing this book, because I thought from the title, that this book would be highly biased towards BEA, and it is true that the examples are based on WebLogic as the application server, however I was pleasantly surprised to discover that the book does a really good job of covering general J2EE principals as well. All in all, a very good read.