Implementing SOA Using Java EE 1st Edition B.V. Kumar 2024 Scribd Download
Implementing SOA Using Java EE 1st Edition B.V. Kumar 2024 Scribd Download
com
https://ebookname.com/product/implementing-soa-using-java-
ee-1st-edition-b-v-kumar/
OR CLICK BUTTON
DOWNLOAD EBOOK
https://ebookname.com/product/advanced-java-programming-uttam-kumar-
roy/
ebookname.com
https://ebookname.com/product/beginning-java-ee-6-platform-with-
glassfish-3-1st-edition-antonio-goncalves/
ebookname.com
https://ebookname.com/product/beginning-ejb-3-2nd-edition-java-
ee-7-edition-jonathan-wetherbee/
ebookname.com
https://ebookname.com/product/ethics-technology-and-engineering-an-
introduction-1st-edition-ibo-van-de-poel/
ebookname.com
https://ebookname.com/product/the-parallax-view-1st-edition-slavoj-
zizek/
ebookname.com
https://ebookname.com/product/the-problem-of-perception-1st-edition-a-
d-smith/
ebookname.com
https://ebookname.com/product/multilingual-currents-in-literature-
translation-and-culture-1st-edition-rachael-gilmour/
ebookname.com
https://ebookname.com/product/nonlinear-partial-differential-
equations-with-applications-1st-edition-tomas-roubicek/
ebookname.com
In Situ Testing in Geomechanics The Main Tests 1st Edition
Fernando Schnaid (Author)
https://ebookname.com/product/in-situ-testing-in-geomechanics-the-
main-tests-1st-edition-fernando-schnaid-author/
ebookname.com
Implementing SOA
Using Java™ EE
™
The Java Series
B. V. Kumar
Prakash Narayan
Tony Ng
Part I Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Products and Services 4
Software-Driven Services 4
Web Services 6
SOA 8
Web Services and SOA Opportunities 12
Summary 13
Endnotes 13
Chapter 2 Evolution of IT Architectures . . . . . . . . . . . . . . . . . . .15
The Server-Side Architecture Progression 16
Progression of Mainframe Architecture 17
Progression of Client/Server Architecture 19
Progression of Distributed Architecture 21
Internet and World Wide Web 26
vii
Anatomy of SOAP 57
Basic SOAP Model 57
Detailed SOAP Model 60
SOAP Encoding Details 65
Simple Type Encoding 65
Complex Type Encoding 66
SOAP Binding to the Transport Protocol 68
Interaction Using the SOAP Protocol 68
Message Exchange Model 69
SOAP Response and the Error-Handling Mechanism 71
The SOAP <Fault> 72
The SOAP <faultcode> 72
The SOAP <faultstring> 73
The SOAP <faultactor> 73
The SOAP <detail> 73
SOAP Version Differences and Dependencies 73
SOAP Versioning 73
New SOAP Version 74
Summary 75
Endnotes 76
Chapter 5 Web Services and Web Services Description
Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
WSDL—An XML Web Services Description Vocabulary 78
The Web Services Triangle 78
Service Invocation Fundamentals 80
Synchronous Invocation and Fundamentals of RPC Mechanism 81
Service Invocation and WSDL 85
Creation of the Service 86
Generating the Web Service Description for the Service 87
Registering the Web Service 87
Publication of the Web Service 87
Discovering the Web Service 87
Understanding the Web Services Semantics 87
Invocation of Web Service 88
Describing Web Services—The XML Way 91
WSDL Elements and Their Appearance Sequence 92
Anatomy of WSDL Document 93
WSDL Version Differences and Dependencies 100
Summary 100
Endnotes 101
x CONTENTS
WS-Coordination 137
WS-Eventing 137
WS-Metadata Exchange 138
WS-Notification 138
WS-Policy Framework 138
WS-Reliability/WS-Reliable Messaging 138
WS-Security 138
WS-*—A Working Definition 139
Addressing 139
Reliability and Reliable Messaging 140
Security 142
WS-* and SOA 146
WS-Reliable Messaging and SOA 147
WS-Security and SOA 147
WS-I Basic Profile 147
Summary 148
Endnotes 148
Part III Java Platform, Enterprise Edition and ESB. . . . . . . . . . . . .149
Chapter 9 Java Platform, Enterprise Edition Overview . . . . . .151
Java EE Technology Categories 153
Web Application Technologies 153
Web Services Technologies 155
Enterprise Application Technologies 158
Common Platform Technologies 160
What's New in Java EE 5 162
Java Annotations 163
POJO Model 165
Developer Productivity 166
Java EE Component Model 167
Application Client 167
Web Components 168
EJB Components 168
Resource Adapter 168
Java EE Quality of Services 169
Distribution 169
Data Integrity 169
Security 169
Performance and Scalability 170
Availability 170
xii CONTENTS
Interoperability 171
Concurrency 171
Summary 171
Endnotes 172
Chapter 10 Web Technologies in Java EE . . . . . . . . . . . . . . . . 173
Java Servlet 174
JSP 176
JSP Standard Tag Library 177
JSF 178
MVC Paradigm in JSF 178
User Interface Component Framework 179
Navigation Model 180
Managed Beans 182
Unified Expression Language 183
Data Conversion and Validation 184
JSF Events 185
Backing Bean Approach 186
Summary 187
Endnote 187
Chapter 11 Enterprise JavaBeans and Persistence . . . . . . . . . 189
Core EJB 3.0 API 190
Dependency Injection 191
Container Services 191
Interceptors 193
New JPA 193
Entity Class 194
Relationships 195
Inheritance 196
Entity Manager 197
Entity Life-Cycle Operations 197
Java Persistence Query Language 200
Object-Relational Mapping 203
Relationship Mapping 203
Inheritance Mapping 204
Summary 205
Chapter 12 Java Web Services Overview . . . . . . . . . . . . . . . . 207
Implementing a Web Service 208
Mapping Between Java and WSDL 208
CONTENTS xiii
Robert Brewin
Recently, seasoned analysts like Anne Thomas Manes have said that SOA is
dead and that it has failed to deliver its promised benefits. There have been
opposing viewpoints to this. ZDNet blogger Joe McKendrick hosted a panel dis-
cussion on “Avoiding SOA Disillusionment,” and the panelists concluded that
any perceived disillusionment stemmed from lack of planning and measurement
on the part of the Enterprises and not from a failure of SOA. In fact, Enterprises
that have been working with SOA practices and methodologies remain bullish
on the approach and recognize that SOA continues to hold promise as a model
for integration and helping to tactically reduce costs in tough times. The promise
of SOA is that it offers an architectural approach to support the proliferation and
adoption of reusable services. This is an approach that companies should adopt
to streamline their development processes and improve the quality and maintain-
ability of their code.
At Sun, we developed the Java Platform, Enterprise Edition (Java EE) as an
industry standard, and it forms the ideal foundation upon which developers can
implement Enterprise-class SOA and next generation web applications. I am
pleased to see this book by Kumar, Narayan, and Ng, which takes a practical
approach to implementing SOA with Java EE. The focus is on real implementa-
tion techniques, leveraging the GlassFish Application Server and NetBeans IDE.
By taking this approach, the authors have demystified SOA from an alphabet
soup of Web Services standards and shown how readers can implement SOA in
their Enterprise readily and easily. In addition to explaining the concepts of SOA
and the concepts of Java EE, the authors dive deep into implementing SOA with
xvii
Java EE and show how services can be delivered within different tiers of an
Enterprise architecture.
Architects, developers, managers, other IT professionals, educators, and students
will benefit from different aspects of this book from concepts to architecting to
implementation, configuration, and tuning. I trust that you will find this book
beneficial and enlightening.
Robert Brewin
Chief Technology Officer, Software
Sun Microsystems
Raj Bala
Now more than ever, concepts like availability, leveragability, scalability,
expandability, extendibility, and security permeate every discussion on technol-
ogy architecture. As companies become more aware of harvesting maximum
sustainable value from technology investments, the architecture fraternity has
always cried loud for how the fundamentals matter. Architectural integrity is
measured by all the “itys” that I mentioned in my first sentence, and it is hearten-
ing to see how the answers have been around and, in fact, getting better.
Service oriented architecture (SOA) as a fundamental fix to future problems has
evolved to newer and more advanced frontiers. Saddling on ever-perfected tech-
nologies such as Java EE, SOA is becoming more appealing and compelling
than ever before.
At Cognizant, we have been developing and delivering Enterprise solutions
using SOA. And it is my privilege to write a Foreword for a book for one of our
own—Kumar is a coauthor along with Prakash and Tony. The book carefully
unravels the vast topic of service oriented architecture through a definitive and
illustrative approach. It segments web services across First Generation Web Ser-
vices for services composition, Second Generation Web Services for wiring
these services into the process/workflow of the enterprise, and WS-* for address-
ing the nonfunctional needs of the Enterprise application. This book will also
double-up as an effective implementation guide on the advanced features of the
new Java Platform, Enterprise Edition and indicate how different APIs, such as
JAX-WS and JAXB, of the new platform help in different aspects of service ori-
entation for the Enterprise application.
This book should be extremely relevant to a variety of stake holders including
architects, senior enterprise developers, and application integrators. This book is
FOREWORDS xix
also a great reference material for students of computer science, software, and
systems architecture.
From academics to architects, practitioners to pedants, students to specialists,
coders to CXOs, this book could be a vital source of SOA inspiration—of how to
build great architecture without compromising on the “itys.”
Raj Bala
VP and Chief Technology Officer
Cognizant Technology Solutions
This page intentionally left blank
Acknowledgments
xxi
I would like to thank Chris Atwood and Octavian Tanase at Sun for their support
and encouragement throughout this project. Special thanks and love to my fam-
ily—Jayanthi, my wife and Akshay, Madhuri, and Rohan, my children—for
always being there for me and supporting my endeavors with vigor. I was fortu-
nate to work with a great team of coauthors: B. V. Kumar and Tony Ng. Each
brought their expert-level skills to make this a rewarding experience. Thanks to
Gopalan Suresh Raj, Binod P. G., Keith Babo, and Rick Palkovic for their semi-
nal paper, “Implementing Service-Oriented Architectures (SOA) with the Java
EE 5 SDK,” which inspired me to explore the subject further and get involved in
writing this book. This book is all about implementation. The basis for this book
is the NetBeans IDE. The team that I worked with—Todd Fast, Chris Webster,
Girish Balachandran, Nam Nguyen, Rico Cruz, Jiri Kopsa, Ajit Bhate, PCM
Reddy, and Hong Lin (among many others)—have all contributed in helping
make the NetBeans product a great success.
On the editorial and production side, thanks to Greg Doench, Michelle Housley,
Anne Goebel, and the rest of the editorial staff at Pearson for their guidance.
—Prakash Narayan
I would like to thank Jeet Kaul and Tom Kincaid for their encouragement and
support, Bill Shannon and Eduardo Pelegri-Llopart for their guidance, and the
entire GlassFish team who worked on the Java EE platform and SDK.
—Tony Ng
About the Authors
Dr. B. V. Kumar, currently the director and chief architect at Cognizant Tech-
nology Solutions, has an M Tech from IIT Kanpur and a Ph.D. from IIT Kharag-
pur. He has more than 19 years of experience in the field of information
technology at various levels and in organizations such as ComputerVision Cor-
poration (Singapore), Parametric Technologies (Seoul, S. Korea), and Sun
Microsystems (India). Prior to joining Cognizant, Dr. Kumar was the principal
researcher and technologist at Infosys Technologies and was responsible for the
research and development activities and new initiatives at the SETLabs. Dr.
Kumar has been working on the Enterprise technologies for more than 7 years,
focusing on J2EE and web services technologies. As a chief architect and direc-
tor at the Global Technology Office of Cognizant (India), Dr. Kumar is manag-
ing IP and asset creation, technology evangelization, and community
development and project support. Dr. Kumar has filed for two patents in the IP
space and published many technological papers in international journals and
conferences. He has coauthored Web Services—An Introduction and J2EE Archi-
tecture.
Prakash Narayan is the CTO and cofounder of Micello, Inc. Micello is an
early-stage startup in Silicon Valley focusing on delivering high-value data to
users at the point of consumption by providing the information within a map of
the indoor location. Prior to founding Micello, Prakash was at Sun Microsys-
tems, where he was one of the founders of Zembly—a social network for devel-
opers to build services, widgets, and social applications. Immediately before
Zembly, Prakash had responsibility for Java EE and SOA tooling in NetBeans.
xxiii
• Chapter 1 Introduction
• Chapter 2 Evolution of IT Architectures
• Chapter 3 Evolution of Service Oriented Architecture
1
Another Random Scribd Document
with Unrelated Content
world's doings had been much shut out from them, and
Frank had given them a peep into its wickedness. Arthur
thought with thankfulness of what might have been, had he
once stepped into the deception which Frank had been
leading him to, and he shuddered when he remembered
how near he had been to it.
Nellie's return home was now fixed for the next week,
and all longed to have her presence once more. She wrote
frequent letters, detailing all her doings, and told them of
the proposed picnic. But while Nellie was in danger under
Orston Cliff, another danger was creeping, unsuspected,
nearer and nearer to that happy circle at home.
CHAPTER XIII.
CALLED HOME.
THE sun rose over Fairleigh the next morning after the
eventful picnic with its own calm grandeur. There was no
sign in its clear shining that it had set the night before on
such a scene of danger to the circle of friends living at
Shellford.
"My dears, why did you not come and tell me what
danger you had been in, last night?"
Hope drew her down and kissed her. "Nellie," she said,
"I think I am going to begin a new life from yesterday."
"Yes; it was you first made me think about it. Aunt Ruth
had often urged me to make a decision; but somehow I
thought there was plenty of time, and that it was for older
people. And then you came, and I found that, though you
were young, it was like the air you breathed, you could not
do without it! And then, Nellie, you asked me, that second
day you were here, if I were a Christian?"
"Dear Hope, not like me; I wish I were more like Him."
"Oh, yes! But still, Nellie, the face of Moses shone, you
know, as we were reading this morning. You need not be
ashamed, dear, but rejoice that it is so."
"How sweet it is," she could not help saying; then the
idea of being sweet here, suggested those at home, and she
added, "Have you heard to-day, grandmamma, from
mamma?"
"I have heard from your father, dear."
"I would not have come away for worlds," said Nellie,
weeping.
"Had you not, dear? Yet no; your father says he fears it
will be a great blow to you."
Nellie began to take in the gravity of the news; and her
loving relatives were powerless to aid her in the sorrow
which she must feel.
"My child," said Aunt Ruth, putting her kind arms round
her shoulders, "this is a heavy trial; but we must all ask for
strength to bear it, and for her precious life to be spared if
possible."
"I could not bear to go without thanking you for all your
kindness; but I'm afraid I have disturbed you."
Mrs. Arundel and Aunt Ruth stood waiting for her in the
drawing room, and she was clasped in her grandmamma's
arms.
"You saved my life," she said gently and gravely; "I can
never forget that."
Then she thought all at once that she had not had
opportunity to get any little presents for them, as she had
intended, and she could not help having a good cry over
this, before she finally put away her tears and determined
to be peaceful.
Nellie did as she was told, but dared not venture into
the nursery on her way up. She could hear hushed voices,
and the little clatter of tea-cups; but she feared lest the
sight of her should raise a shout, and she passed into her
room.
"She says dear mamma does not know you are come,
so there is no hurry; and you will feel all the better for it."
She knelt down by her bed for an instant. She knew not
what to say, and no words would form themselves in her
mind beyond a cry of, "Help me, oh, help me!" Then she
rose, and slowly went down to her mamma's room.
How still the house was inside, and what a roar the
passing cabs and vehicles made! Nellie stood outside on the
mat till the wild beating of her heart should cease. She
could not pray, but her thoughts went towards God
nevertheless—her only Refuge.
The first thing she saw was Ada, sitting in the window
working, and then her glance took in the rest of the room;
her mamma lying in a wrapper on the sofa, and her father
seated by her, with her hand in his.
She kissed the ashy pale cheek, and then bent to greet
her father, who rose and gave her his seat, himself leaving
the room.
Mrs. Arundel did not speak for some time, and Nellie sat
silently by her.
"We did not expect this, dear, so soon; but God knows
best, Nellie."
"I am glad you are come, dear. I trust them all to you.
You will do your best for them, Nellie?"
Ada had turned her back and dropped her work in her
lap, and now sat with her arms resting on the table and her
face looking out into the square, of which, however, she saw
nothing.
"Then there are our dear children. Take care of Ada and
Arthur, my elder ones. Guard them, if you can, from the
wicked world."
She paused, and looking upwards, seemed to be
praying; and Nellie heard the words softly whispered, "I
pray not that Thou shouldst take them out of the world, but
that Thou wouldst keep them from the evil."
"He will care for them, Nellie. And my little ones, teach
them to love Jesus. If I knew I were saying my last word on
earth, it would be, 'Teach them to love Jesus.'"
"Then my poor little baby boy. But I know you and Ada
will care for him, and teach him of Jesus; will you not,
Ada?"
"I told nurse to take your place, dear, for a few minutes,
that I might speak to you," said her father.
Nellie was going to ask him a question about it; but now
that the urgent need for calmness was removed her strong
command over herself gave way, and throwing herself into
her father's arms she wept as if her heart would break.
"I will see about it," said Dr. Arundel as he went out.
She sat down stonily at the table and cut some bread
and butter, pushing the loaf towards her sister, saying in a
low voice, "Eat."
Then they were both silent. What could they say? The
blow was too fresh and too heavy to allow of words. Arthur
came in, and began his tea, like them, in silence. After they
had eaten as much as they could force themselves to
swallow, Ada proposed that they should go upstairs again.
"I think I can, papa," he had said; "and you don't know
how bad it is to be right away from her."
"Not quite."
"And baby?"
"Just ready for bed."
When the little ones were gone, and the door had
closed on them, their mother turned round in the bed and
hid her face.
They sat silently by her for some time, but presently Dr.
Arundel whispered to them to go to bed.
"I will stay with her till two o'clock," said Dr. Arundel to
the nurse, "then you can come."
He sat down by her, and the only sound within was the
ticking of his watch, while without, the roar and rumble of
the great city went on the same as ever.
"Not in pain?"
"Oh, no," she whispered; "only peace. I did not know
that it could be so; that He would be able to make me
willing."
THE early daylight was stealing into the room, when Dr.
Arundel became certain that his dearly-loved one was no
longer there.
He knelt down by her side and laid his head against her
arm. "My dear, my dear," he said softly, "what shall I do
without you?"
"What is it, papa? Why are you moving me? Doesn't she
want me any more?"
The strong arms pressed him, and the awful sobs stilled
a little.
He bent his head over his little son, but no words would
come. Tom lay still, looking first at him, and then upwards;
and at last Dr. Arundel spoke.
There was a long, deep silence after this, while the sun
gradually rose and peeped in at the window, and stole along
the floor till its bright rays touched little Tom's pale face.
* * * * * *
"We must all die some day, you know, dears, unless,
indeed, the Lord Jesus should come first and fetch us all
away; but if not that, we must all die; and dear mamma
told me to tell you that she wants you all to come to be
where she is. How do you think you can get there?"
The little girls only clung closer to her dress; but she
was glad to believe that they already knew the way, and
were walking in it.
"Jesus is the way. If you ask Him, He will take you by-
and-by to be where you will see dear mamma again."
Ada was there, lying across the foot of her bed, with her
face downwards; she went up to her, and stood silently by
her side. At last she put out her hand and softly smoothed
her hair.
Nellie had been called into her father's study, and had
received instructions, which had seemed to seal her
desolation.