Pro Apache Geronimo
Total Page:16
File Type:pdf, Size:1020Kb
Pro Apache Geronimo Kishore Kumar Pro Apache Geronimo Copyright © 2006 by Kishore Kumar All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-59059-642-5 ISBN-10 (pbk): 1-59059-642-0 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: Steve Anglin Technical Reviewer: Harshad Oak, Dilip Thomas Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser, Matt Wade Project Manager: Beth Christmas Copy Edit Manager: Nicole LeClerc Copy Editor: Elizabeth Cate Assistant Production Director: Kari Brooks-Copony Production Editor: Kelly Gunther Compositor: Linda Weidemann, Wolf Creek Press Proofreader: Elizabeth Berry Indexer: Rebecca Plunkett Artist: Kinetic Publishing Services, LLC Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or visit http://www.springeronline.com. For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail [email protected], or visit http://www.apress.com. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at http://www.apress.com in the Source Code section. Contents at a Glance About the Author . xi About the Technical Reviewer . xiii Acknowledgments . xv Introduction . xvii ■CHAPTER 1 Getting Started . 1 ■CHAPTER 2 Geronimo Architecture . 23 ■CHAPTER 3 Web Application Development with Geronimo . 47 ■CHAPTER 4 Session Beans. 67 ■CHAPTER 5 Entity Beans. 95 ■CHAPTER 6 JMS and Message-Driven Beans . 137 ■CHAPTER 7 J2EE Enterprise Applications. 157 ■CHAPTER 8 Developing Web Services and J2EE Connectors . 167 ■CHAPTER 9 J2EE Application Clients . 213 ■CHAPTER 10 Advanced Geronimo . 225 ■INDEX . 243 iii Contents About the Author . xi About the Technical Reviewer . xiii Acknowledgments . xv Introduction . xvii ■CHAPTER 1 Getting Started . 1 History . 1 Features . 2 IOC Container As the Core Geronimo Platform . 2 GBean-Based Modular Services . 2 JSR 77 Support . 2 JSR 88 Support . 3 J2EE Application Containers . 3 Web Services . 4 Java Message Service (JMS) and Messaging Services . 4 J2EE Security . 4 Transactions . 4 JDBC Connection Pools . 4 JavaMail . 4 Apache Active Directory Support. 5 Specification Support . 5 Web-Based Administration Console . 6 Other Features . 6 New Features in Geronimo 1.0 . 6 Installing Geronimo . 7 Obtaining Geronimo. 7 Installing Geronimo Quickly . 7 Installing Using the Installer. 8 Browsing the Geronimo Installation . 17 Starting the Server . 18 Stopping the Server . 22 Summary . 22 v vi ■CONTENTS ■CHAPTER 2 Geronimo Architecture . 23 Architecture Components Overview. 23 GBeans . 25 Configurations . 25 Configuration Manager . 26 Dependency Manager . 26 Configuration Store . 27 Persistent Configuration List . 28 Repository . 28 Registry . 28 Kernel. 29 More About GBeans . 29 GBean Names. 31 GBean Attributes . 31 GBean References . 32 GBean Life Cycle . 34 More About the Geronimo Kernel . 35 Geronimo Server Startup . 36 MBeanServerKernelBridge. 38 Deployment Architecture . 39 Geronimo Deployer . 40 Deploy Tool . 41 Classloader Architecture . ..