Oracle and Java Development 1st ed Edition Bulusu Lakshman pdf download
Oracle and Java Development 1st ed Edition Bulusu Lakshman pdf download
https://ebookname.com/product/oracle-and-java-development-1st-ed-
edition-bulusu-lakshman/
https://ebookname.com/product/java-programming-with-oracle-
jdbc-1st-ed-edition-donald-bales/
https://ebookname.com/product/linux-shell-scripting-cookbook-1st-
ed-1st-edition-sarath-lakshman/
https://ebookname.com/product/oracle-database-programming-using-
java-and-web-services-1st-edition-kuassi-mensah/
https://ebookname.com/product/sweeteners-and-sugar-alternatives-
in-food-technology-2nd-edition-kay-odonnell/
Realistic Painting Workshop 1st edition Edition Dan
Carrel
https://ebookname.com/product/realistic-painting-workshop-1st-
edition-edition-dan-carrel/
https://ebookname.com/product/postwar-population-transfers-in-
europe-1945-1955-joseph-b-schechtman/
https://ebookname.com/product/why-is-yawning-contagious-
everything-you-ever-wanted-to-know-about-the-human-body-and-some-
things-you-d-rather-not-know-1st-edition-francesca-gould/
https://ebookname.com/product/classroom-literacy-assessment-1st-
edition-jeanne-r-paratore/
https://ebookname.com/product/faith-seeking-understanding-an-
introduction-to-christian-theology-3-ed-edition-barth/
Six Sigma and Beyond Design for Six Sigma 1st Edition
D.H. Stamatis
https://ebookname.com/product/six-sigma-and-beyond-design-for-
six-sigma-1st-edition-d-h-stamatis/
Bulusu Lakshman
Interior Designer
Warning and Disclaimer Gary Adair
Every effort has been made to make this book as complete and as accurate as Cover Designer
possible, but no warranty or fitness is implied. The information provided is on Alan Clements
an “as is” basis. The author and the publisher shall have neither liability nor
Page Layout
responsibility to any person or entity with respect to any loss or damages aris-
Ayanna Lacey
ing from the information contained in this book.
Stacey Richwine-DeRome
ii
Contents at a Glance
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Part I Introduction
1 Introduction to Oracle Java Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
iii
Table of Contents
Introduction..................................................................................................1
Part I Introduction
iv
How Compilation Is Done? ...............................................................................29
Dropping the Java Method.................................................................................30
Creating the Java Stored Procedure and Publishing It.................................................31
Defining Call Specifications—Basics ...............................................................31
Defining Top-level Call Specs ...........................................................................34
Defining Call Specs as Part of a Package..........................................................35
Defining Call Specs as a Member Method of a SQL Object Type ...................39
Granting Access Privileges...........................................................................................43
Calling the Java Stored Procedure................................................................................43
Calling from the Top Level................................................................................43
Calling from Database Triggers.........................................................................44
Calling from SQL DML ....................................................................................48
Calling from PL/SQL ........................................................................................49
Summary.......................................................................................................................51
v
ORACLE AND JAVA DEVELOPMENT
vi
CONTENTS
vii
ORACLE AND JAVA DEVELOPMENT
viii
CONTENTS
ix
ORACLE AND JAVA DEVELOPMENT
x
CONTENTS
xi
Compile Any Dependent Classes ....................................................................427
Translate the JSP on the Server Side or Pre-translate the JSP Pages
on the Client Side..........................................................................................427
Load the Translated JSP Pages into the Oracle8i Database ............................428
Optionally “Hotload” the Generated Page Implementation Classes ...............428
“Publish” the JSP Pages ..................................................................................428
Access the JSP Using a URL ..........................................................................430
Summary.....................................................................................................................431
Index 432
xii
About the Author
Bulusu Lakshman is the author of the book Oracle Developer
Forms Techniques from Sams Publishing. He holds an Oracle
Masters credential from Oracle Corporation and is OCP-Certified.
He also holds Master level BrainBench certifications. He has more
than nine years of experience in using Oracle and its associated
tools in the development of mission-critical applications. Most
recently, he has used Oracle 8i and its related technologies for
developing applications for a Fortune 400 client. He has lectured at
different national and international conferences and authored tech-
nical articles for lead publications in the United States and United
Kingdom. Currently he works for Compunnel Software Group Inc.,
a leading technical consulting firm in New Jersey and can be
reached at [email protected] or
[email protected]. He lives in Edison, New Jersey, with
his wife Anuradha and writes poetry during his free time.
xiii
Dedication
This book is dedicated to the memory of my brother
Bulusu Harihar Mallikarjuna, whose loving words still ring in my ears.
Acknowledgments
I thank my lovely and sweet wife Anuradha and my brother B.K. Visweswar for providing
help in preparing part of the manuscript.
I thank my parents, Prof. B. S. K. R. Somayajulu and Smt. B.Sita for their constant encour-
agement throughout.
I thank Mr. Paul Wu, Director, MIS, Associated Press, the client company for which I am
consulting, for providing me with necessary resources to write this book.
I thank the publisher and various editors at Sams Publishing, for the opportunity to publish
my book.
My sincere gratitude goes to all concerned for their help and advice.
xiv
Tell Us What You Think!
As the reader of this book, you are our most important critic and commentator. We value your
opinion and want to know what we’re doing right, what we could do better, what areas you’d
like to see us publish in, and any other words of wisdom you’re willing to pass our way.
As an executive editor for Sams Publishing, I welcome your comments. You can e-mail
or write me directly to let me know what you did or didn’t like about this book—as well as
what we can do to make our books stronger.
Please note that I cannot help you with technical problems related to the topic of this book,
and that due to the high volume of mail I receive, I might not be able to reply to every
message.
When you write, please be sure to include this book’s title and author as well as your name
and phone or fax number. I will carefully review your comments and share them with the
author and editors who worked on the book.
E-mail: [email protected]
Mail:
Sams Publishing
800 East 96th Street
Indianapolis, IN 46240 USA
xv
Introduction
Oracle has emerged as the world’s first Internet database with the introduction of Java in the
database. The latest release Oracle 9i and its previous release, Oracle 8i, have made significant
advancements in the areas of Java, e-commerce, and business-to-business (B2B) and business-
to-consumer (B2C). The combination of Oracle 8i and Java provides a robust and effective
environment for development and deployment of applications. Oracle 8i incorporates a Java
Web server in the RDBMS (Relational Database Management System) that enables a wide
variety of database functions using Java. Basically, these fall under three main categories:
• Database access from Java
• Building reusable components
• Deploying Java in a Web environment
This book covers the Oracle Java technologies involved in these three areas. If you’re develop-
ing applications incorporating these Java technologies or you’re migrating from older technolo-
gies, you can benefit from this book. This book is divided into four parts with thirteen chapters
as follows:
Introduction
This includes Chapter 1, “Introduction to Oracle Java Technologies,” describing the particular
Java technologies that are relevant from an Oracle perspective, categorized in three ways
described earlier. A brief description of each technology is presented.
2
INTRODUCTION TO
ORACLE JAVA
TECHNOLOGIES
ESSENTIALS
• Java technologies can be incorporated into the Oracle8i database
in three ways, namely, database access in Java, building reusable
Java components, and employing Java in a Web environment.
• Database access in Java is by using Java Stored Procedures, Java
Database Connectivity, and SQLJ.
• Building reusable Java components is by using JavaBeans,
Enterprise JavaBeans, and Business Components for Java (BC4J).
• Employing Java in a web environment is by using Java Servlets and
Java Server Pages.
• Oracle8i provides a seamless environment where Java and PL/SQL
can interoperate as two major database languages. Java Stored
Procedures can reside in Oracle8i and JDBC and SQLJ applications
can access the database. In addition, Enterprise JavaBeans, CORBA
objects, BC4J objects, Java Servlets, and Java Server pages can be
deployed in the Oracle8i database.
I: INTRODUCTION
Java technologies, based on the multi-tier component-based model, currently dominate the
scene of Internet application development. Java, JavaBeans, Java Servlets, and Enterprise
JavaBeans (EJB) Technologies constitute the most fundamental architectural change in soft-
ware development in the coming years. Oracle8i has positioned itself as a tool for developing
Web-commerce megasites using the popular paradigm of component-based multi-tier applica-
tions. It makes use of Java technologies to achieve this.
This chapter explains the Oracle Java technologies available and gives a brief description of
each. It offers an outline of how Java technologies can be incorporated into the Oracle8i data-
base in three ways: database access in Java, building reusable Java components, and employing
Java in a Web environment. Database access in Java is done by using Java Stored Procedures,
Java Database Connectivity, and SQLJ. Building reusable Java components is achieved by
using JavaBeans, Enterprise JavaBeans, and Business Components for Java. Employing Java in
a Web environment is done by using Java Servlets and Java Server Pages.
Oracle8i database server has an Oracle JServer that includes a Java Virtual Machine (JVM)
called Aurora, a Java runtime environment, and supporting Java class libraries. The Oracle
JServer is a server-side Java engine for the Oracle8i database. A JVM is a Java Virtual Machine
that takes care of compiling and executing Java code. The Oracle JServer along with the con-
tained JVM is embedded in the Oracle8i RDBMS and is integrated with SQL and PL/SQL. It
enables interoperability of Java and PL/SQL inside the database. Oracle8i also has the capabil-
ity of handling CORBA components and EJB support. In addition, Java Server Pages (JSP) and
Java Servlets can be deployed in the Oracle8i database. Both Java and PL/SQL (Procedural
Language/Structured Query Language) can interoperate as two database languages. Java applets
and applications can access Oracle8i using Java Database Connectivity (JDBC) or SQLJ. These
Oracle Java technologies are discussed in-depth in the remaining chapters of this book.
6
1: INTRODUCTION TO ORACLE JAVA TECHNOLOGIES
The mapping between Java and PL/SQL data types is also described. Examples illustrate how
a Java Stored Procedure can be invoked from PL/SQL blocks, database triggers, and top-level
code and object type methods.
7
I: INTRODUCTION
Chapter 5, “Basic SQLJ Programming,” explains the use of SQLJ for database access in Java.
It starts by discussing the fundamentals of SQLJ and then proceeds to outline SQLJ query pro-
cessing, DML processing, and exception handling. Chapter 6, “Advanced SQLJ
Programming,” presents advanced topics such as handling object types, large objects, and col-
lections in SQLJ and SQLJ performance extensions. The chapter closes with a brief discussion
of SQLJ in the server.
JavaBeans
JavaBeans are Java classes designed to serve as reusable components. Beans are the basic com-
ponent model in Java applications. Individual component Beans can be easily integrated to
form complex applications. A Bean Development Kit (BDK) can be used to make the develop-
ment and deployment of a Bean easier.
A Java class can be converted to a Bean by changing it to adhere to the JavaBeans specifica-
tion. A good example of a JavaBean is one that performs a validation based on certain input.
In an application, it is a good idea to design most of the GUI-related components as Beans
even though some Beans need not be related to the GUI. This is because the GUI-related com-
ponents, once developed as a Bean, can be reused in multiple Java applications and are easily
“pluggable” in existing pieces of code and become part of the application.
8
Exploring the Variety of Random
Documents with Different Content
was compelled to make concessions to the commercial
spirit.
While the number of unfree was great, they were not all
equally unfree. The lowest grade were slaves in the real
sense of the word; that is, they were chattels. But this class
was not numerous and was tending to disappear. The highest
grade was composed of those who were personally free, and
who could amass property; but they were unfree in that they
had no legal status. That is, they could not appear in court as
a party to a suit, nor could they testify as witnesses. In all
legal matters they had to have some one to represent them in
the court. These are the two extremes, between which there
were a great many unfree classes or groups, each differing
from the other in the degree of personal or property rights
which they possessed. An idea of some of these classes will
be gained from the following documents.
There were many ways in which a serf could be set free, but
after 850 the form used in this document was not uncommon.
A freeman was to a great extent dependent on his relatives
as witnesses. He could not prove his freedom without their
testimony. When a serf was set free he was without a family,
because his relatives, being serfs, could not testify in court.
The charter which the king gave him was the only evidence of
freedom which he possessed. It took the place of the
testimony of his relatives.
Henry, etc. Let all our faithful Christian subjects, both present and
future, know that we, at the request of a certain nobleman, named
Richolf, have freed a certain one of his female serfs, named Sigena,
by striking a penny out of her hand. We have freed her from the
yoke of servitude, and have decreed that the said Sigena shall in the
future have the same liberty and legal status as all other female
serfs have who have been freed in the same way by kings or
emperors....
Frederick, etc. We wish all to know that A—— of N—— has told us
that although his father was not a knight yet he wishes to become
one. He therefore besought us to make him a knight. In order to
reward the faithfulness of him and of his family we grant his petition
and, out of the fulness of our power, we grant that, although his
father was not a knight, and although our laws forbid anyone to be a
knight who is not born of a noble family, he may nevertheless with
our permission put on the military girdle, and we forbid all people to
hinder or prevent him from doing this.
From paragraphs 9, 13, 16, etc., we learn that there were two
classes of these serfs, the fisgilini, and the dagewardi. Of
these the fisgilini were the higher in the social scale.
According to paragraphs 9 and 29 they had a share in the
wergeld of members of their family and they were not
compelled to render services except of a certain kind or in
certain departments of the bishop’s household. The services
which they were bound to render were considered less
servile, less ignoble, than those required of the dagewardi.
From these facts it is inferred that their ancestors had at one
time been free, but had surrendered their lands and their
freedom and become bondmen of the church for the sake of
securing protection. Bishops and abbots were generally
regarded as lenient lords in comparison with secular princes,
and many preferred to become bondmen of the church rather
than of secular lords. The lands which they held they passed
on from father to son (par. 2 and 3), and they could amass
property and dispose of it (par. 1 and 4). From paragraphs
26, 27, and 28 there seems to have been some difference
between the fisgilini who lived in the city and those who lived
in the country. The former were no doubt artisans, the latter,
peasants. But it is not clear what other differences existed
between them.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com