Skip to Main Content
Enterprise JavaBeans, Second Edition
book

Enterprise JavaBeans, Second Edition

by Richard Monson-Haefel
September 2001
Intermediate to advanced content levelIntermediate to advanced
489 pages
14h 44m
English
O'Reilly Media, Inc.
Content preview from Enterprise JavaBeans, Second Edition

Chapter 10. XML Deployment Descriptors

What Is an XML Deployment Descriptor?

One of the biggest changes between EJB 1.0 and 1.1 is the introduction of XML deployment descriptors. In EJB 1.0, deployment descriptors were serialized Java objects; you wrote a program that set up an appropriate DeploymentDescriptor, and then serialized that object. This approach was clumsy at best, even for experienced developers. XML deployment descriptors are much easier to edit, even without special tools for editing XML files. An XML deployment descriptor is simple enough that it’s easy to create a descriptor using nothing more than your favorite text editor, be it Notepad, Emacs, or vi.

This chapter discusses what goes into an XML deployment descriptor; it teaches you how to write deployment descriptors for your beans. Keep in mind that you may never need to write a deployment descriptor by hand; most vendors of integrated development tools and EJB servers will provide tools for creating the descriptor automatically. Even if you have such a tool available, however, you should be familiar enough with deployment descriptors to be able to read them on your own.

This chapter doesn’t attempt to teach you how to read or write correct XML. There are many books on the subject; a good quick reference is XML Pocket Reference by Bob Eckstein (O’Reilly). Very briefly, XML looks like HTML, but with different tag names and different attributes inside the tags. You won’t see <h1> and <p> inside a deployment descriptor; ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Enterprise JavaBeans, Third Edition

Enterprise JavaBeans, Third Edition

Richard Monson-Haefel
Enterprise JavaBeans, Fourth Edition

Enterprise JavaBeans, Fourth Edition

Sacha Labourey, Bill Burke, Richard Monson-Haefel
Enterprise JavaBeans 3.0, 5th Edition

Enterprise JavaBeans 3.0, 5th Edition

Richard Monson-Haefel, Bill Burke
Enterprise JavaBeans 3.1, 6th Edition

Enterprise JavaBeans 3.1, 6th Edition

Andrew Lee Rubinger, Bill Burke

Publisher Resources

ISBN: 1565928695Supplemental ContentCatalog PageErrata