About This Document

Enterprise JavaBeans (EJB) is a specification that provides an infrastructure through which solution providers can develop components that you can purchase and use in your WebObjects applications with minimal effort. In addition, the components can be configured to work with a variety of databases (as long as the database supports JDBC). The key ingredient in these components is enterprise beans. Enterprise beans are business objects that contain logic used to perform specific tasks. They are similar to enterprise objects in WebObjects, but can be used in application servers from multiple vendors.

Enterprise JavaBeans is part of Sun’s Java 2 Platform, Enterprise Edition (J2EE) strategy. J2EE provides an abstraction from the implementation details of databases, directory services, communication protocols, and so on. EJB aims at providing you an abstraction layer between your application’s business logic and the implementation-specific details of the data entities it uses. An enterprise-bean developer doesn’t have to worry about which database is used when the bean is deployed, freeing the developer to concentrate on the business problem. WebObjects implements version 1.1 of the EJB specification.

Enterprise JavaBeans support in WebObjects lets you integrate third-party, enterprise-bean–based solutions in your WebObjects applications. This means you can purchase components that solve a particular problem, so that you can focus on issues specific to your business. In addition, you can develop your own enterprise beans using WebObjects tools. You must keep in mind, however, that Enterprise Object technology does not complement, nor can be efficiently combined with Enterprise JavaBeans. When you write enterprise beans, you use a persistence-management system that is completely separate from Enterprise Objects. You should not have enterprise beans that use the same database tables that enterprise-object classes are mapped to.

You should read this document if you want to learn how to incorporate an EJB-based solution in a WebObjects application or you want to develop your own enterprise beans using WebObjects tools. However, it is not the purpose of this document to teach you EJB development. If you want to develop enterprise beans, you must already have a sound knowledge of the technology.

The document includes the following chapters:

To get the most out of this document you should be an experienced WebObjects application developer. In particular, you need to know how to create applications using Project Builder and be familiar with the layout of a Project Builder project. To make use of enterprise beans in an application, you are required to edit configuration files written in XML; therefore, you should be familiar with XML’s rules and syntax.

To streamline your learning experience, you can take advantage of the companion resources that are included with this document in the databases, models, and projects directories in your hard disk or in the TAR file that you can download from http://developer.apple.com/documentation/WebObjects/index.html.

If you need to learn the basics about developing WebObjects applications, you can find pertinent documents and resources in http://developer.apple.com/webobjects.

If you need to learn about EJB development, these books provide you introductory information as well as development guidelines:

WebObjects uses open-source implementations of the EJB container, the object request broker, the transaction manager, and the persistence manager. For details about those implementations in WebObjects, consult the following resources: