professional oracle 8i application programming with java, pl sql and xml

1.1K 3.1K 0
professional oracle 8i application programming with java, pl sql and xml

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

www.it-ebooks.info Professional Oracle 8i Application Programming Michael Awai Matthew Bortniker John Carnell Sean Dillon Drew Erwin Jaeda Goodman Bjarki Hólm Ann Horton Frank Hubeny Thomas Kyte Glenn E. Mitchell II Kevin Mukhar Gary Nicol Daniel O'Connor Guy Ruth-Hammond Mario Zucca Wrox Press Ltd.    www.it-ebooks.info Professional Oracle 8i Application Programming © 2000 Wrox Press All rights reserved. No part of this book may be reproduced, stored in a retrieval system or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical articles or reviews. The author and publisher have made every effort in the preparation of this book to ensure the accuracy of the information. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, Wrox Press nor its dealers or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. Published by Wrox Press Ltd, Arden House, 1102 Warwick Road, Acocks Green, Birmingham, B27 6BH, UK Printed in Canada ISBN 1-861004-84-2 www.it-ebooks.info Trademark Acknowledgements Wrox has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Wrox cannot guarantee the accuracy of this information. Credits Authors Technical Reviewers Author Agents Michael Awai Duncan Ainsworth Tony Berry Matthew Bortniker Danny Ayers Velimir Ilic John Carnell Yogesh Bhandarkar The Churchill Team Graham Bowden Project Administrators Sean Dillon Luis Cabral Cilmara Lion Drew Erwin Robert Chang Chandima Nethisinghe Jaeda Goodman Jitendra Chitkara Bjarki Hólm Daryl Collins Indexers Ann Horton Michael Corning Alessandro Ansa Frank Hubeny Jeremy Crosbie Andrew Criddle Thomas Kyte Dean Dameron Glenn E. Mitchell II Robin Dewson Production Coordinator Kevin Mukhar Sean Dillon Tom Bartlett Gary Nicol Drew Erwin Daniel O'Connor Mark Fehrenbacher Illustrations Guy Ruth-Hammond Dario Ferreira Gomes Shabnam Hussain Mario Zucca Nikolay Fiykov Frank Hubeny Cover Contributing Authors Manzoor Hussain Shelley Frazier Sandeepan Banerjee Mike Kay Frank Bell Aakash Kambuj Proof Readers Bambi Bellows Doug Kanwischer Chris Smith Kelly Cox Victor Kolesov Keith Westmoreland Shekhar Dhupelia Thomas Kyte Agnes Wiggers Michael Kay Todd Lauinger Karen Little Production Manager Technical Architect Steven Livingston Simon Hardware Tony Davis Jim MacIntosh Jennifer McGurk Technical Editors Vinay Menon Fiver Löcker Jon Millard Jim Molony Brian Peasland Mohammed Rfaquat Sarma PRKV Robert Shaw John Roberts Jordon Saardchit Managing Editor Anunaya Shriwastava Paul Cooper Leslie Tierstein Raj Vuchatu Hiroko Wilensky www.it-ebooks.info About the Authors Michael Awai Michael Awai lives near Charlotte, North Carolina, USA. He is currently a Consulting Partner with a successful privately owned consulting company. He works as a system architect, helping clients leverage the Internet, build extranet services and accomplish their application and business integration goals. He and his partner Karla are currently expecting their first baby and their first Irish wolfhound. Matthew Bortniker Matt has been in the computer field since 1982 and is an independent consultant for local businesses in the Washington DC area and for the US government. Currently his main tasks include upgrading client server applications to enterprise wide systems written entirely in Visual Basic and utilizing Oracle and Microsoft technologies. He is the author of Professional VB6 MTS Programming, ISBN 1861002440,and contributing author in Professional Windows DNA, ISBN 1861994451, (both Wrox Press). He can be reached at pc_geek37@hotmail.com. John Carnell John Carnell has had an obsession with computers since he was twelve years old, working on his Commodore 64. That obsession never waned and he is currently working as a Senior Systems Architect for Workscape, a leading provider of Human Resources and and Employee Benefits self- service solutions. John's favorite topic of discussion, much to his wife's chagrin, is component based N-tier architectures. John has extensive experience with Microsoft, Oracle and Java N-tier solutions. He lives in Waukesha, Wisconsin with his wife Janet and his two pups Ladybug and Ginger. John can be reached at john_carnell@yahoo.com. For my mother Deborah: What I have achieved in my life is a summation of your hard work, dedication, and most importantly your sacrifices. And to Janet: You are my inspiration. I love you both. The Churchill Team Chandrabhanu Ambatipudi, Ekta Rani Agarwal, John Ipe, and Makarand Kulkarni form the ‘Oracle supreme & Java dream’ team at Churchill Software Services India (CSSI). CSSI was established in 1996 in Bangalore India as an Oracle offshore development center, by an ex-Oracle UK management team. Since its inception the center has been serving the UK market with an exclusive focus on the Oracle platform, meshing cutting edge technologies with established Oracle technologies, and providing innovative road map solutions for the Internet age. Sean Dillon Sean got his start programming a Commodore Vic 20, back in 1980. Trying to program sprites and word games in the enormous 3.5Kb of user memory was truly a labor of love. He is now a Senior Oracle Technologist, working for Oracle Corporation based in Reston, Virginia. He has eight years of experience specializing in database architecture, tuning, web application development, and now XML-based technologies. Sean is one of the lead designers on Oracle's Web Education Initiative for children, Think.com. He is also an avid Quake player. Sean lives outside Washington, DC with his wife, Whitney, and two sons, Jordan and Cameron. I would like to thank my wife for her never-ending support and encouragement. www.it-ebooks.info Drew Erwin Drew is a technical project leader and has been working with Oracle products for the last nine years. The last three of those have been dedicated to enterprise application development with the ever changing and improving Oracle toolset. Outside of work, Drew’s interests include his family, Pam and Hannah, his Playstation, and traveling. Jaeda Goodman Jaeda Goodman is currently working as a Principal Software Engineer for Keane Ltd., the company who were responsible for the Sun Connect Framework. She has over four years experience working with Oracle and Java, encompassing everything from data warehousing to EJBs, servlets and JSPs – and also InfoBus, if anyone needs any advice or consultation about this now esoteric technology. Jaeda’s non-technical interests include house restoration, American TV imports, and the ability to make an amazing blue punch, although of course the latter does not mix well with all of the former, especially InfoBus. I'd like to dedicate this to everyone who went through the Synchromatic experience with me. Bjarki Hólm For more than three years Bjarki has been designing and developing commercial software tools at SALT Systems, Inc. His work includes the development of SALT Solutions, a website construction suite built with Java technology. His areas of (technical) interest include Enterprise Java, XML and e- commerce Oracle applications. In his working and waking hours, Bjarki is studying computer engineering at the University of Iceland, and with his Wrox authoring on top of this, he tends to get very little sleep. Bjarki can be reached at holm@salt.is. Ann Horton Ann Horton is the President of Horton Associates, Inc. and has over twelve years experience designing, developing, and managing Oracle projects. She has worked closely with Oracle Corporation for many years, is active in the Oracle User Group Community, and is a frequent presenter at ODTUG, IOUG-A, RMOUG, and ECO conferences. Ann has been extremely active in the Oracle Development Tools User Group (ODTUG) serving as a member of the Board of Directors, conference chairperson, and paper selection chair for numerous conferences, and ODTUG Volunteer of the Year for 2000. Ms. Horton has also worked as an Affiliate Professor for the Regis University evening MSCIS Program since 1992 teaching database classes to working students in the Denver area. In her spare time, Ann enjoys biking, hiking, bird watching, and scuba diving with her husband Dean. Thanks to my husband Dean, my brother Tom, Jim, and Betty, and all my friends who have encouraged me to participate in this book project! Frank Hubeny Frank Hubeny is a certified Oracle 8i DBA and currently works for Experian doing data warehousing. He has recently worked for WExcel in Chicago where he designed and built databases for web applications and used the PL/SQL Toolkit extensively. www.it-ebooks.info Thomas Kyte Thomas Kyte is an Oracle professional who works for Oracle Corporation in the US. He specializes in database architecture, implementation, and tuning. In addition to his regular duties at Oracle, Tom writes an ongoing article for Oracle Magazine and can be found on the web answering questions via ‘Ask Tom’ on the Oracle Magazine website. Prior to working for Oracle, Tom worked with a contractor developing database applications and tools using many different commercial database products. Tom lives in Leesburg VA, USA with his wife Lori and two children, Alan and Megan. Glenn E. Mitchell II Glenn E. Mitchell II, who prefers ‘Mitch’, wears many different hats. He is president of .Com Consulting Group, a computer-consulting firm in Tallahassee, Florida. Mitch is also a faculty administrator at the University of South Florida in Tampa, Florida, where he directs the State Data Center on Aging, teaches graduate and undergraduate students, and earns lots of frequent flyer miles. He also holds a Ph.D. from the University of Iowa. Mitch writes and speaks at conferences extensively on object-oriented analysis and design, C++, Java, Visual Basic, and Microsoft SQL Server. When not a busy professional, Mitch is husband to Lillian and dad to Jessica. Lillian is a veterinarian, whose passion is small animal medicine. Jessica recently became a teen and spends her spare time alternately studying Latin and listening to pop music. Mitch wants to dedicate his contribution to his wife, Lillian, who is also a busy professional and tolerates him spending countless hours in front of the computer. Kevin Mukhar Kevin Mukhar is a software engineer who lives and works in Colorado, USA. He spent 12 years in the US Air Force, where many of his jobs included using computers, but none of them involved writing software. Still, he managed to dabble in various languages as a hobby, and had enough practical experience to land a software engineering job when he left the Air Force. For the past two years he has been part of a team that developed a distributed system to manage and access large amounts of binary data from an Oracle database. His heroes are Steve McConnell and Philip Greenspun. Now that he has finished writing (part of) a book, he understands why many married writers thank their spouse; and so, he too, thanks his wife for tolerating him during the last few months. Gary Nicol Gary Nicol is a Senior Consultant within the eBusiness division of Mi Services Group, and has worked on a number of web-based projects involving integration of Oracle and Microsoft technologies. Having originally cut his teeth on a Sinclair ZX Spectrum, he took a twisted career path, via a degree in Electronic Engineering, followed by a brief incarnation as a semiconductor engineer, before realising that developing software was a much more fun way to spend his working day. In writing for this book, he has surprised not only himself, but probably a number of his high school teachers, who would never have believed he was capable of forming a coherent sentence (even when they could read his handwriting). www.it-ebooks.info Daniel O'Connor Daniel O'Connor is an independent software developer currently working on management applications using J2EE technologies, including EJB and JSP. He is a member of the board of directors for jBoss.org, an open-source application server featuring an EJB container. He is one of the authors of the Professional Java Server Programming J2EE Edition, Wrox Press, ISBN 186199463. He is also a principal of MVCSoft, Inc., which provides training and consulting on J2EE application development. I would like to dedicate my efforts in this book to Christina Coughlin. Mario Zucca Some years ago Mario moved from the procedural world to the object-oriented one. Although it was a difficult step to take he's since fallen in love with Java and J2EE technologies and in particular with XML-related technologies such as XSL, XPath and SOAP. I love freedom! I would like to dedicate this book to my daughter Federica. When she reads this book, many of the technologies will be prehistoric things, but I hope in an even freer world. www.it-ebooks.info www.it-ebooks.info Summary of Contents Introduction 1 Section I: The Database 11 Chapter 1: Internet Programming with Oracle 8i 11 Chapter 2: Enterprise Application Design 31 Chapter 3: Database Foundations 53 Chapter 4: Scaling Your Application with Net8 83 Chapter 5: Enterprise Development with Designer 6i 105 Section II: PL/SQL and the Web 171 Chapter 6: PL/SQL Development 171 Chapter 7: PL/SQL Server Pages 207 Chapter 8: The PL/SQL Web Toolkit 225 Chapter 9: A Stock Tracker using the PL/SQL Web Toolkit and JavaScript 257 Chapter 10: Web PL/SQL Application Development Using Designer 6i 291 Section III: Java 343 Chapter 11: Oracle JVM and Java Stored Procedures 343 Chapter 12: Oracle Access with JDBC 393 Chapter 13: Connection Pooling and Caching 453 Chapter 14: Database Connectivity with SQLJ 501 Chapter 15: Enterprise JavaBeans and Oracle 557 Chapter 16: Inside the Database 629 Chapter 17: Business Components for Java 655 Chapter 18: A Discussion Forum using PL/SQL and Java 719 Chapter 19: Overview of Oracle interMedia Text 779 Chapter 20: Building a Search Engine using Java and interMedia 803 Section IV: XML 827 Chapter 21: Oracle and XML 827 Chapter 22: A Case Study in Enterprise Application Development 893 Chapter 23: Application Integration using SOAP 941 Chapter 24: Wireless Applications with Oracle Portal-to-Go 1005 Chapter 25: ASP, XML and Oracle 1049 Section V: Appendices 1107 Appendix A: Installation Issues 1107 Appendix B: Java Primer 1145 Appendix C: XML Primer 1179 Appendix D: Support, Errata, and p2p.wrox.com 1221 Index 1227 www.it-ebooks.info [...]... Database PL/ SQL and the Web Java XML Appendices 3 3 4 5 6 The Tools you Need for this Book 6 Development Kits Web and Application Servers Tools 6 7 7 Conventions 7 Customer Support 8 Source Code and Updates Errata 8 8 Section I: The Database 11 Chapter 1: Internet Programming with Oracle 8i 11 A Brief History of Oracle 12 Versions and Editions of Oracle 8i 13 Programming Support 14 PL/ SQL 14 The PL/ SQL. .. Contents Portal-to-Go SimpleResult XML 1026 SimpleResult SimpleContainer SimpleText SimpleTextItem SimpleMenu SimpleMenuItem SimpleForm SimpleFormItem SimpleFormSelect SimpleFormOption SimpleTable SimpleTableHeader SimpleTableBody SimpleRow SimpleCol Simple but Powerful 1026 1027 1027 1027 1028 1028 1028 1029 1029 1029 1030 1030 1030 1031 1031 1031 Writing Your Own Adapter 1031 Writing and Modifying Existing... Constructor Executing the Search Replacing Tags Fetching the Search Results Closing the Search Engine 814 814 815 816 817 819 Example Client 820 Summary 825 Section IV: XML 827 Chapter 21: Oracle and XML 827 XML Parsers 828 Parsing XML Running the Oracle XML Parser Parsing with SAX Parsing with the DOM Parsing with a DTD Parsing with an XML Schema 829 829 829 834 837 837 XML Query and Transformation 841 XPath... (JDBC) SQLJ Servlets and JavaServer Pages (JSP) Enterprise JavaBeans Remote Method Invocation (RMI) with CORBA and IIOP JDeveloper Business Components for Java (BC4J) 21 21 22 22 23 23 23 Oracle XML Developer's Kit 24 Oracle InterMedia 25 Text Services Imaging, Audio, and Video Services Oracle Spatial Cartridge 25 25 25 Oracle 8i and the Internet 26 Internet Application Server (iAS) 26 Oracle iAS Standard... The PL/ SQL Web Toolkit PL/ SQL Server Pages 15 16 Traditional Oracle Development Tools 16 Oracle Forms and Reports Oracle Portal Designer 16 17 17 www.it-ebooks.info Table of Contents Oracle 8i and Java 18 The Oracle Java Virtual Machine 19 Advantages of the Oracle JVM JDK Compatibility Java Stored Procedures 20 20 20 Differences between Oracle JVM and JDK The J2EE Framework and Oracle 20 21 Java Database... Detail View 687 Associations 688 Application Module 689 Exception Handling Approaches with BC4J Exporting Application Module Methods to Clients Deploying Business Components 690 691 691 Creating a Remotable Application Module Creating the Deployment Profile Connecting To the Deployed Application 692 693 694 Where Are We Now? 694 Inserting Data 695 Building the JSP Client Application 695 RestaurantsView_Browse.jsp... Procedures and Functions Record Locking in a Stateless HTTP Environment Replicating Oracle Forms Functionality Replicating Visual Attributes Replicating Function Blocks Replicating Controls Replicating Item-Level Triggers Remote Scripting Oracle AppWizard for Microsoft Visual InterDev Integration with Oracle Developer Server 1067 1068 1072 1072 1072 1076 1077 1077 1092 1092 Using ASP and XML with Oracle. .. Section II: PL/ SQL and the Web 171 Chapter 6: PL/ SQL Development 171 Minimal Development Environment 172 Reference Material Programming Editor Version Control Software SQL Performance Tools Debugging Profiling Testing Programming Style 172 172 173 173 176 176 177 178 Writing PL/ SQL 178 Building a PL/ SQL Test Framework 179 Packages 179 Data Packages The ex Exception Package The Test Framework Display Packages... 270 Frontend Display Package 275 Support Files 280 JavaScript: htm.js Javascript: stocks.js Style Sheet: stocks.css 281 282 287 Summary 289 viii www.it-ebooks.info Table of Contents Chapter 10: Web PL/ SQL Application Development Using Designer 6i 291 Getting Started 292 Overview 292 Designer's Web PL/ SQL Application Development Process Setup the Web Application Environment Create an Application Schema... Coding and Compiling the Java Class Editing and Compiling the Code from the Command Line Editing and Compiling the Code in Oracle JDeveloper Examining the Code Simple Debugging with System.out() and System.err() Deploying to the Database Deploying from the Command Line Resolver Syntax Checking Installation Status Other loadjava Options for Class Loading/Resolving Un-installing Java Classes with dropjava . 11 Chapter 1: Internet Programming with Oracle 8i 11 A Brief History of Oracle 12 Versions and Editions of Oracle 8i 13 Programming Support 14 PL/ SQL 14 The PL/ SQL Web Toolkit 15 PL/ SQL Server Pages. Enterprise Application Development 893 Chapter 23: Application Integration using SOAP 941 Chapter 24: Wireless Applications with Oracle Portal-to-Go 1005 Chapter 25: ASP, XML and Oracle 1049 Section. Enterprise Development with Designer 6i 105 Section II: PL/ SQL and the Web 171 Chapter 6: PL/ SQL Development 171 Chapter 7: PL/ SQL Server Pages 207 Chapter 8: The PL/ SQL Web Toolkit 225 Chapter

Ngày đăng: 01/08/2014, 16:31

Từ khóa liên quan

Mục lục

  • Cover

  • Copyright

  • About the Authors

    • Michael Awai

    • Matthew Bortniker

    • John Carnell

    • The Churchill Team

    • Sean Dillon

    • Drew Erwin

    • Jaeda Goodman

    • Bjarki Hólm

    • Ann Horton

    • Frank Hubeny

    • Thomas Kyte

    • Glenn E. Mitchell II

    • Kevin Mukhar

    • Gary Nicol

    • Daniel O'Connor

    • Mario Zucca

    • Summary of Contents

    • Table of Contents

Tài liệu cùng người dùng

Tài liệu liên quan