Enterprise JavaBeans(TM): Developing Component-Based Distributed Applications - Softcover

Thomas B. Valesky

  • 2.40 out of 5 stars
    5 ratings by Goodreads
 
9780201604467: Enterprise JavaBeans(TM): Developing Component-Based Distributed Applications

Synopsis

Enterprise JavaBeans(tm) facilitates the development of distributed Java(tm) applications, providing an object-oriented transactional environment for building distributed, component-based, multitier enterprise applications.

Enterprise JavaBeans is designed to get you up-to-speed quickly, focusing on the exact information you need to become an effective Enterprise JavaBeans programmer. This example-filled book serves as an introduction and tutorial, and provides the in-depth information you need to handle real-world programming challenges.

This book presents an overview of the architecture, using a "Hello, world!" Enterprise JavaBeans system to illustrate basic concepts. The book then moves on to cover Session and Entity beans, how to write client programs that use Enterprise JavaBeans, and the packaging and deploying of Enterprise JavaBeans. You will find precise explanations on specific topics such as:

The differences between stateful and stateless beans
-- The differences between bean-managed and container-managed
-- Entity beans
-- How to call a bean from a servlet, another bean, or an applet
-- How to obtain and examine Enterprise JavaBeans metadata
-- How to identify deployment descriptors and the values they contain
-- How to use access control lists to set up permissions on an
-- Enterprise JavaBeans server
-- How a bean can retrieve and test a client's identity

In addition, substantial examples and an "implementation diary" demonstrate the implementation process, the available options and tradeoffs, and the rationale behind development choices. A chapter devoted to tips and common pitfalls provides concrete rules of thumb for more effective Enterprise JavaBeans programming. The accompanying CD-ROM includes Enterprise JavaBeans software and examples from the book.

Enterprise JavaBeans gives you the background you need to use the system productively in your daily work and puts you on the fast track to mastering Enterprise JavaBeans techniques.

"synopsis" may belong to another edition of this title.

About the Author

Tom Valesky is Principal Software Engineer for Computer Based Systems, Inc., a contracting firm that specializes in working with civilian-sector Federal agencies. He has extensive experience developing client-server software under a variety of platforms. He is also a Contributing Editor for Advisor Publications' E-Business Advisor.

0201604469AB04062001

From the Back Cover

Enterprise JavaBeanso facilitates the development of distributed Javao applications, providing an object-oriented transactional environment for building distributed, component-based, multitier enterprise applications.

Enterprise JavaBeans is designed to get you up-to-speed quickly, focusing on the exact information you need to become an effective Enterprise JavaBeans programmer. This example-filled book serves as an introduction and tutorial, and provides the in-depth information you need to handle real-world programming challenges.

This book presents an overview of the architecture, using a "Hello, world!" Enterprise JavaBeans system to illustrate basic concepts. The book then moves on to cover Session and Entity beans, how to write client programs that use Enterprise JavaBeans, and the packaging and deploying of Enterprise JavaBeans. You will find precise explanations on specific topics such as:
* The differences between stateful and stateless beans
* The differences between bean-managed and container-managed Entity beans
* How to call a bean from a servlet, another bean, or an applet
* How to obtain and examine Enterprise JavaBeans metadata
* How to identify deployment descriptors and the values they contain
* How to use access control lists to set up permissions on an Enterprise JavaBeans server
* How a bean can retrieve and test a client's identity

In addition, substantial examples and an "implementation diary" demonstrate the implementation process, the available options and tradeoffs, and the rationale behind development choices. A chapter devoted to tips and common pitfalls provides concrete rules of thumb for more effective Enterprise JavaBeans programming. The accompanying CD-ROM includes Enterprise JavaBeans software and examples from the book.

Enterprise JavaBeans gives you the background you need to use the system productively in your daily work and puts you on the fast track to mastering Enterprise JavaBeans techniques. 0201604469B04062001

Excerpt. © Reprinted by permission. All rights reserved.

Preface

This book discusses Enterprise JavaBeans (EJB). It assumes that you have basic knowledge of Java, but does not assume detailed knowledge of distributed computing. The primary goal of this book is to provide a relatively short and easy-to-read document that will get you up to speed quickly on how to develop EJB. Its secondary goal is to serve as a good companion text for a short course on EJB development.

Chapter 1 provides an overview of EJB--that is, what it is and where it fits into the world of distributed computing. If you're looking for technical details, you won't find them in this chapter. Nevertheless, this discussion provides some background that you can use to convince your manager that EJB is a good thing.

Chapter 2 offers an overview of the EJB architecture. It describes the various components that make up an EJB system and covers the major classes and interfaces used in the development of an EJB bean.

Chapter 3 is the first chapter that contains coding examples. It presents a "hello, world!" EJB system. The "hello world" example was chosen for two reasons. First, in coming to terms with a new technology, a simple example is useful in helping you to figure out the core components of the system. Second, the main intent in this chapter is to highlight the steps you need to perform to write and deploy an EJB bean; in this case, a simpler bean provides fewer distractions from this discussion.

Two types of EJB beans exist: Session beans and Entity beans. Chapter 4 covers Session beans. It discusses the differences between stateful and stateless beans, and provides examples of each.

Chapter 5 discusses Entity beans. It describes the differences between bean-managed and container-managed entity beans, providing an example of each.

In Chapter 6, the issue is writing client programs that use EJB beans. It includes quite a few examples, including those demonstrating

How to obtain and use handles to beans

How to call a bean from a servlet

How to call a bean from another bean

How to call a bean from an applet

How to use client-side transaction management

How to obtain and examine EJB metadata

Chapter 7 focuses on the process of packaging and deploying EJB beans. It includes a detailed discussion of deployment descriptors and the values they contain. It also examines access control lists and shows how to use them to set up permissions on an EJB server. In addition, Chapter 7 includes an example that shows how a bean can retrieve and test a client's identity.

Chapter 8 contains a set of tips for constructing distributed systems--or any other type of system, for that matter. The goal of this chapter is to provide you with some concrete rules of thumb that you can use in your own development process and to help you avoid making a few common mistakes.

Chapter 9 includes a relatively nontrivial example program (a time management system) and a sort of "implementation diary" in which the author describes the process used to create the example. This process involves assessing the options available, analyzing the tradeoffs among them, and making the final choices.

In Chapter 10--the "wrap-up" chapter--currently available EJB servers are discussed. Currently, relatively few implementations are available, so we also discuss EJB servers that are not available as of this writing, but should be out soon. This chapter concludes with a discussion of the future of the EJB specification; fortune-telling is a risky business, so the predictions generally stick to issues that are certain to be included in future versions of the EJB standard.

As noted earlier, the goal of this book is to provide you with a quick but thorough introduction to EJB--quick, so you can start using EJB soon, and thorough, so that you won't be flummoxed by real-world situations because only a few canned examples were involved. If you have any comments or suggestions for improvement, please send me an e-mail at tvalesky@patriot.net.

It is a fact of life that the EJB specification and its associated documents will undergo some evolution over the next few years. To accommodate these changes, we've made an online supplement to this book available. This supplement will track changes and new developments in the specification, include new examples that demonstrate new capabilities for EJB, and generally keep you up-to-date with what's going on in the EJB world. Be sure to stop by.

A note on Java versions is in order here. The examples in this book were developed in JDK 1.1, and the accompanying WebLogic software should be run under JDK 1.1 Throughout this book, notations have been made where things will change under Java 2 (formerly known as JDK 1.2). For late-breaking news, refer to his book's companion Web site.

A note about the formatting of the code examples: In the source code in this book, all actual new lines begin with a line number. In some cases, the lines were too long to be displayed correctly and have wrapped around to a new line. So, if you see a line in one of the examples like line 15 here:

15 System.out.println("this is a very very very long line"); 16 System.out.println("this is shorter");

rest assured that all is well with the actual code.

Acknowledgments

Thanks to the WebLogic folks, especially Bob Pasker and Sriram Srinivasan. Their support has been first-rate.

Thanks to Jonathan K. Weedon of Inprise Corporation for the CORBA client example.

Thanks to the folks on the EJB-INTEREST list, for many happy hours of conversation about EJB, and for serving as a sounding board for many of my ideas.

Thanks to the team at EJBHOME for developing a freeware EJB implementation. The word will spread faster if the price of entry is not into five figures.

Thanks to the reviewers of this manuscript, James D. Frentiss, Liane Acker, Gary McGraw, Ajit Sagar, J. Patrick Ravenal, Ethan Henry, and Jim Inscore, all of whom helped clarify and refine the manuscript.

Thanks to my teachers.

Thanks to Russ Marshall and the gang at BLS, for giving me my first programming job at a time when I had few qualifications other than enthusiasm, and for showing me the value of good requirements and thorough testing.

Thanks to the folks at Javasoft, for changing the world.

Thanks to David Kodama and Dana Gardner, my long-suffering editors at Advisor Publications, for keeping me honest.

Thanks to the staff at Addison Wesley Longman, especially Elizabeth Spainhour, Mary O'Brien, and Maureen Willard.

Thanks to Mom and Dad for putting me through college. Top o' the world, Ma!

--Tom Valesky

"About this title" may belong to another edition of this title.