Before You Begin |
This book describes how to build Enterprise JavaBeans components (enterprise beans) using the Sun
ONE Studio 5, Standard Edition, integrated development environment (IDE).
Enterprise beans come in several varieties. A session bean can be stateful or stateless, and can manage its own transactions or have them managed by the EJB container. An entity bean can manage its own persistence or let the container manage its relationship with the underlying database. You can use the Sun ONE Studio 5 IDE to build those enterprise beans as well as message-driven beans and sets of entity beans whose relationships are managed by the EJB container. Flexible support is available to the developer in building all of these types of enterprise beans. The IDE streamlines the task of coding and helps ensure that the results are consistent with the Java Blueprints for the Enterprise (the J2EE
Blueprints).
Another book in this series, Building J2EE Applications, suggests designs for industrial-strength applications that use enterprise beans and other J2EE components. It offers various application scenarios, and explains how to assemble finished enterprise beans and other components into modules, how to deploy them in applications, and how to run those applications. This book, Building Enterprise JavaBeans Components, concentrates on the design and creation of enterprise beans, and on basic issues of assembly, configuration, deployment, and testing. If you are responsible for providing enterprise beans, assembling them into applications, and deploying them on application servers, you should refer to both books.
You can use the Sun ONE Studio 5 IDE to create the examples in this book on the systems listed in the Release Notes. Find the Release Notes on the following website:
http://forte.sun.com/ffj/documentation/index.html
Screen shots vary slightly from one platform to another. You should have no trouble translating the slight differences to your platform. Although almost all procedures use the IDE's user interface, you might occasionally be instructed to enter a command at the command line. Here too, there are slight differences from one platform to another. For example, a Microsoft Windows command might look like this:
c:\>cd MyWorkDir\MyPackage |
To translate for UNIX® or Linux environments, simply change the prompt and use forward slashes:
% cd MyWorkDir/MyPackage |
If you want to use the Sun ONE Studio 5 IDE to build enterprise beans, you will benefit from reading this document. Before you start, you should be familiar with the following subjects:
To develop enterprise beans, you need to know J2EE concepts and generally to understand enterprise beans. When you need to know more than this book covers, refer to the following list of resources:
At some stages of enterprise bean development, you also need to know about specific application servers. Refer to a server's documentation for details.
Chapter 1 introduces J2EE and Enterprise JavaBeans concepts, and gives an overview of the Sun ONE Studio 5 IDE's support for creating enterprise beans and assembling them into EJB modules.
Chapter 2 discusses design and programming issues for those who use the IDE to build enterprise beans, assemble EJB modules, and create J2EE applications.
Chapter 3 tells how to use the IDE to create stateless or stateful session beans that manage their own transactions or delegate their transaction management to the EJB container.
Chapter 4 tells how to use the IDE to create single entity beans with container-managed persistence (CMP entity beans).
Chapter 5 tells how to use the IDE to create sets of CMP entity beans with their relationships automatically included.
Chapter 6 tells how to use the IDE to create entity beans with bean-managed persistence (BMP entity beans).
Chapter 7 tells how to use the IDE to create message-driven beans.
Chapter 8 shows how to configure EJB components for deployment by setting properties on the bean, the EJB module, and the J2EE application.
Chapter 9 explains how to use the IDE's testing feature to test enterprise beans on Sun ONE Application Server 7.
Appendix A contains a reference for working with enterprise beans in the IDE.
Appendix B provides tips on updating and converting EJB 1.1 enterprise beans so that they can be used successfully in EJB 2.0 applications.
The names of commands, files, and directories; on-screen computer output |
||
What you type, when contrasted with on-screen computer output |
||
Read Chapter 6 in the User's Guide. |
||
Sun ONE Studio 5 documentation includes books delivered in Acrobat Reader (PDF) format, online help, release notes, readme files for example applications, and Javadoc documentation.
The documents described in this section are available from the docs.sun.comSM web site and from the documentation page of the Sun ONE Studio Developer Resources portal (http://forte.sun.com/ffj/documentation/index.html).
The docs.sun.com web site (http://docs.sun.com) enables you to read, print, and buy Sun Microsystems manuals through the Internet. If you cannot find a manual, see the documentation index that is installed with the product on your local system or network.
You can also find the completed tutorial applications at: http://forte.sun.com/ffj/documentation/tutorialsandexamples.html
Online help is available in the Sun ONE Studio 5 IDE. You can open help by pressing the help key (F1 in Microsoft Windows and Linux environments, Help key in the Solaris environment), or by choosing Help Contents. Either action displays a list of help topics and a search facility.
You can download examples that illustrate a particular Sun ONE Studio 5 feature, as well as completed tutorial applications, from the Sun ONE Studio Developer Resources portal at:
http://forte.sun.com/ffj/documentation/tutorialsandexamples.html
Javadoc documentation is available within the IDE for many Sun ONE Studio 5 modules. Refer to the release notes for instructions on installing this documentation.
The documentation is provided in accessible formats that are readable by assistive technologies for users with disabilities. You can find accessible versions of documentation as described in the following table.
HTML at http://docs.sun.com |
|
HTML at http://forte.sun.com/ffj/documentation/tutorialsandexamples.html |
|
HTML in the example subdirectories of s1studio-install-directory/examples |
|
HTML at http://docs.sun.com |
If you have technical questions about this product that are not answered in this document, go to:
http://www.sun.com/service/contacting
Sun is interested in improving its documentation and welcomes your comments and suggestions. You can email your comments to Sun at:
Please include the part number (817-2330) of this document in the subject line of your email.
Copyright © 2003, Sun Microsystems, Inc. All rights reserved.