Before You Begin

The Java Community Process, supported by Sun Microsystems, Inc., has evolved standards for designing distributed, enterprise applications with the Javatrademark 2 Platform, Enterprise Edition (J2EEtrademark platform). The J2EE platform documentation listed in Before You Read This Book covers these standards for application design and architecture.

This book is about how you implement these architectures with the Suntrademark Java Studio Enterprise 7 2004Q4 developer tools. It is about using the integrated development environment (IDE) to combine components and create J2EE modules, making sure that all of the components interact in the way that the application design specifies. It is also about combining J2EE modules to create J2EE applications, making sure that the distributed interactions between the modules function in the way that the application design calls for.

Screen shots vary slightly from one platform to another. Although almost all procedures use the interface of the Java Studio Enterprise software, occasionally you might 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

A UNIX® command might look like this:


% cd MyWorkDir/MyPackage


Before You Read This Book

This book is intended for anyone who uses the Java Studio Enterprise IDE to assemble, deploy, or execute J2EE applications. The first chapter summarizes the J2EE platform concepts of assembly and deployment, and it should benefit anyone seeking a general understanding of assembly and deployment.

This book assumes a familiarity with the following subjects:

This book requires a knowledge of J2EE concepts, as described in the following resources:

Familiarity with the Java API for XML-Based RPC (JAX-RPC) is helpful. For more information, see this web page:

http://java.sun.com/xml/jaxrpc



Note - Sun is not responsible for the availability of third-party Web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Sun will not be responsible or liable for any actual or alleged damage or loss caused by or in connection with the use of or reliance on any such content, goods, or services that are available on or through such sites or resources.




How This Book Is Organized

The J2EE platform makes possible a component-oriented approach to developing enterprise applications. Application developers encapsulate business logic in EJB components and web components. After creating components, developers assemble their components into modules, which are units of logic that perform recognizable business tasks. After assembling modules, developers assemble their modules into J2EE applications. J2EE applications perform entire business processes.

This book is about using the Java Studio Enterprise development environment to assemble components into modules, and modules into applications. The book presents this information in a series of "scenarios."

Chapter 1 summarizes the J2EE concepts of assembly and deployment. It defines the J2EE units of modules and applications and examines module and application deployment descriptors. This chapter also explains how to assemble modules and applications in the IDE. In particular, this chapter explains how to use module and application property sheets to set up module and application deployment descriptors.

Chapter 2 describes a scenario that shows how to assemble a web module. This chapter includes a short description of a web module that is used as the front end of a J2EE application. This chapter then shows how to program the web module.

Chapter 3 describes a scenario that shows how to assemble an EJB module. This chapter includes a short description of an EJB module that is used in a J2EE application. This chapter then shows how to program the EJB module.

Chapter 4 describes a scenario that shows how to assemble a J2EE application by combining a web module and an EJB module. This chapter includes a short description of a J2EE application that combines a web module and an EJB module. This chapter then shows how to assemble the application. This scenario features synchronous interaction between the two modules, using Java Remote Method Invocation (RMI).

Chapter 5 describes a scenario that shows how to set up asynchronous communications between modules using a message-driven enterprise bean (MDB). This chapter includes a short description of asynchronous communication used in a business application. This chapter then shows how to program both the sending and receiving sides of the application. The scenario in this chapter features a web module communicating with an EJB module, but the example can be applied to other combinations of modules.

Chapter 6 explains how to program container-managed transactions with the IDE.

Chapter 7 explains how to secure the resources in a J2EE application using the IDE. This chapter shows how to set up security roles at the module level and how to use the security roles to restrict access to web module resources and enterprise bean methods. This chapter also shows how to map security roles when modules are assembled into an application.

Chapter 8 explains how to deploy and execute assembled applications. In particular, it explains how to tailor an application for a specific server product before deployment.

Appendix A looks at the mechanism the IDE uses to interact with web and application servers. It includes a detailed account of the deployment process.


Typographic Conventions


Typeface

Meaning

Examples

AaBbCc123

The names of commands, files, and directories; on-screen computer output

Edit your.cvspass file.

Use DIR to list all files.

Search is complete.

AaBbCc123

What you type, when contrasted with on-screen computer output

> login

Password:

AaBbCc123

Book titles, new words or terms, words to be emphasized

Read Chapter 6 in the User's Guide.

These are called class options.

You must save your changes.

AaBbCc123

Command-line variable; replace with a real name or value

To delete a file, type DEL filename.



Related Documentation

Java Studio Enterprise documentation includes books and tutorials delivered in Acrobat Reader (PDF) format, release notes, online help, and tutorials delivered in HTML format.

Documentation Available Online

The documents described in this section are available from the docs.sun.comSM web site and from the Documentation link from the Sun Java Studio Enterprise Developers Source portal (http://developers.sun.com/jsenterprise).

The docs.sun.com web site (http://docs.sun.com) enables you to read, print, and buy Sun Microsystems manuals through the Internet.

This document describes last-minute release changes and technical notes.

This document describes how to install the Sun Java Studio Enterprise 7 integrated development environment (IDE) on each supported platform and includes other pertinent information, such as system requirements, upgrade instructions, server information, command-line switches, installed subdirectories, database integration, and information on how to use the Update Center.

Describes how to assemble EJB modules and web modules into a J2EE application and how to deploy and run a J2EE application.

This document describes the Web Application Framework component architecture and the process to design, create, and distribute new components.

This document describes the components available in the Web Application Framework Library.

This document introduces the Web Application Framework and what it is, how it works, and what sets it apart from other application frameworks.

This document introduces the mechanics and techniques to build a web application using the Web Application Framework tools.

This document provides the steps to create and use application components that can be assembled to develop an application using the Web Application Framework and explains how to deploy the application in most J2EE containers.

This document describes the various parts of the Sun Java Studio Enterprise 7 2004Q4 IDE and emphasizes the use of the visual tools for developing a Web Application Framework application.

This document gives a brief introduction to the Web Application Framework tag library, as well as a comprehensive reference to the tags available within the library.

Documentation for Sun Java System Web Server 6.1, including Getting Started, Installation and Migration, and Administrator's Guides, are available at http://docs.sun.com/db/prod/s1websrv#hic

Tutorials

Sun Java Studio Enterprise 7 tutorials help you understand the features of the IDE. Each tutorial provides techniques and code samples that you can use or modify in developing more substantial applications. All tutorials illustrate deployment with Sun Java System Application Server.

All tutorials are available from the Tutorials and Code Camps link off the Developers Source portal, which you can access from within the IDE by choosing Help right arrow Examples and Tutorials.

Online Help

Online help is available in the Sun Java Studio Enterprise 7 IDE. You can open help by pressing the help key (F1 in Microsoft Windows environments, Help key in the Solaris environment), or by choosing Help right arrow Contents. Either action displays a list of help topics and a search facility.

Documentation in Accessible Formats

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.


Type of Documentation

Format and Location of Accessible Version

Books and tutorials

HTML at http://docs.sun.com

Tutorials

HTML at the Examples and Code Camps link from the Developers Source portal at http://developers.sun.com/jsenterprise

Release notes

HTML at http://docs.sun.com



Sun Welcomes Your Comments

Sun is interested in improving its documentation and welcomes your comments and suggestions. Email your comments to Sun at this address:

docfeedback@sun.com

Please include the part number (819-0819-10) of your document in the subject line of your email.