Building Soabased Composite Applications Using
Netbeans Ide 6 Frank Jennings download
https://ebookbell.com/product/building-soabased-composite-
applications-using-netbeans-ide-6-frank-jennings-1477684
Explore and download more ebooks at ebookbell.com
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Building Soabased Composite Applications Using Netbeans Ide 6 David
Salter Frank Jennings
https://ebookbell.com/product/building-soabased-composite-
applications-using-netbeans-ide-6-david-salter-frank-jennings-4098274
Building The Agile Enterprise With Soa Bpm And Mpm Fred A Cummins Auth
https://ebookbell.com/product/building-the-agile-enterprise-with-soa-
bpm-and-mpm-fred-a-cummins-auth-4341514
Soa With Rest Principles Patterns Constraints For Building Enterprise
Solutions With Rest Erl
https://ebookbell.com/product/soa-with-rest-principles-patterns-
constraints-for-building-enterprise-solutions-with-rest-erl-7108214
Building Spas With Django And Html Over The Wire Learn To Build
Realtime Single Page Applications With Python 1st Edition Andros
Fenollosa
https://ebookbell.com/product/building-spas-with-django-and-html-over-
the-wire-learn-to-build-realtime-single-page-applications-with-
python-1st-edition-andros-fenollosa-44868684
Building The Snowflake Data Cloud Monetizing And Democratizing Your
Data Andrew Carruthers
https://ebookbell.com/product/building-the-snowflake-data-cloud-
monetizing-and-democratizing-your-data-andrew-carruthers-44888670
Building Web Applications With Vuejs Mvvm Patterns For Conventional
And Singlepage Websites Ralph Steyer
https://ebookbell.com/product/building-web-applications-with-vuejs-
mvvm-patterns-for-conventional-and-singlepage-websites-ralph-
steyer-44898498
Building Bridges Between Soft And Statistical Methodologies For Data
Science Luis A Garcaescudero
https://ebookbell.com/product/building-bridges-between-soft-and-
statistical-methodologies-for-data-science-luis-a-
garcaescudero-44905084
Building Microservices Designing Finegrained Systems 2nd Edition 2nd
Release 2nd 20220708 Second Release Sam Newman
https://ebookbell.com/product/building-microservices-designing-
finegrained-systems-2nd-edition-2nd-release-2nd-20220708-second-
release-sam-newman-45010590
Building Python Microservices With Fastapi Build Secure Scalable And
Structured Python Microservices From Design Concepts To Infrastructure
1st Sherwin John C Tragura
https://ebookbell.com/product/building-python-microservices-with-
fastapi-build-secure-scalable-and-structured-python-microservices-
from-design-concepts-to-infrastructure-1st-sherwin-john-c-
tragura-45036900
Building SOA-Based
Composite Applications Using
NetBeans IDE 6
Design, build, test, and debug service-oriented
applications with ease using XML, BPEL, and
Java web services
David Salter
Frank Jennings
BIRMINGHAM - MUMBAI
Building SOA-Based Composite Applications Using
NetBeans IDE 6
Copyright © 2008 Packt Publishing
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 embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of
the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the authors, Packt Publishing,
nor its dealers or distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: February 2008
Production Reference: 1010208
Published by Packt Publishing Ltd.
32 Lincoln Road
Olton
Birmingham, B27 6PA, UK.
ISBN 978-1-847192-62-2
www.packtpub.com
Cover Image by Nilesh R. Mohite (nilpreet2000@yahoo.co.in)
Credits
Authors
David Salter
Frank Jennings
Reviewer
Mario Pérez Madueño
Acquisition Editor
Priyanka Baruah
Development Editor
Nikhil Bangera
Technical Editor
Bhupali Khule
Editorial Team Leader
Mithil Kulkarni
Project Manager
Abhijeet Deobhakta
Indexers
Hemangini Bari
Monica Ajmera
Proofreader
Angie Butcher
Production Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade
About the Authors
David Salter is an enterprise software architect who has been developing software
professionally since 1991. His relationship with Java goes right back to the beginning,
using Java 1.0 for writing desktop applications and applets for interactive web
sites. David has been developing Enterprise Java Applications using both the J2EE
standards and open source solutions for the last five years. David runs the Java
community web site Develop In Java (http://www.developinjava.com), a web site
for all levels of Java developers.
Foremost, I would like to thank my wife and family for putting
up with my many hours at the computer whilst writing this book.
Special thanks go to my wife for all her encouragement and support.
I'd also like to say thank you to all the people at Packt Publishing,
especially Priyanka, Abhijeet, Bhupali, and Patricia. Thanks also
go to the NetBeans Enterprise Developer community, who have
provided help and assistance throughout the writing of this book.
Frank Jennings works in the Information Products Group of Sun Microsystems
Inc. He has more than 9 years of experience in Java, SOA and System Design. He
is an Electronics Engineer from Madras University and has worked for several
open source projects. Frank has written regular columns for leading Java journals
including Java Developer's Journal and Linux Developer's Week. Frank is also the
co-author of the book SOA Approach to Integration focusing on SOA design pattern for
enterprises. Frank also is involved in the technical publication of Sun Microsystems
in the fields of Solaris and Developer AMP Stack. His blog can be read at
http://blogs.sun.com/phantom and he can be reached at theghost@sun.com.
He also holds a Post Graduate Diploma in Computer Science and an Advance
Diploma in Computer Integrated Management from University of Indianapolis.
It is just amazing how the guys at Packt Publishing put up with me
inspite of my late drafts. I would like to thank Abhijeet and Bhupali
for all their hardwork in making me work to complete this book.
I also thank the NetBeans Documentation team for providing an
extensive set of tutorials on the SOA capabilities of NetBeans.
About the Reviewer
Mario Pérez Madueño was born in 1975 in Turin and lives in Barcelona. He
graduated in ETIS from the Open University of Catalonia (UOC) in 2006 and is
currently finishing studies for the EI degree. He is a foundation member of ARUOC
robotics group in the same University. Mario is a Java SE, ME and EE enthusiast and
a fan of NetBeans IDE, he is currently contributing with the Spanish translation team
for NetBeans 6.
Acknowledgements goes for my wife María, for her unconditional
help and support in all the projects I get involved, and to Martín for
giving me the force for going ahead.
Table of Contents
Preface 1
Chapter 1: Enterprise Application Development 7
SOA and POA 8
Introduction to Various BPEL Processes 10
Partner Services 11
Activities 12
Variables 12
Composite Applications and JBI 15
AirAlliance Company 17
The Problem 17
The Enterprise Stack 19
Summary 20
Chapter 2: Getting Started 21
Getting the Software 21
NetBeans IDE 6.0 22
OpenESB 22
Setting up the Environment 23
NetBeans Projects 25
Summary 26
Chapter 3: Service Engines 27
Need for Java Business Integration (JBI) 27
Enterprise Service Bus 29
The Normalized Message Router 30
Service Engine Life Cycle 31
Service Engines in NetBeans 33
BPEL Service Engine 35
Java EE Service Engine 38
Increased Performance 39
Table of Contents
[ ii ]
Transaction Support 39
Security Support 39
SQL Service Engine 39
IEP Service Engine 41
XSLT Service Engine 44
Summary 49
Chapter 4: Binding Components 51
Binding Components 51
NetBeans Support for Binding Components 52
File Binding Component 54
SMTP Binding Component 57
SOAP Binding Component 64
JDBC Binding Component 66
JMS Binding Component 68
Other Binding Components 70
Summary 71
Chapter 5: BPEL Designer 73
BPEL for Business Process 74
Understanding BPEL Projects 78
BPEL Views 79
Design View 80
Source View 81
BPEL Mapper 82
Palette 83
Web Service Activities 84
Invoke 84
Receive 86
Reply 87
Partner Link 88
Other BPEL Activities 90
Navigator Window 90
A Simple Example 91
BPEL 2.0 Elements 111
BPEL Products and Vendors 112
Summary 113
Chapter 6: WSDL Editor 115
What is WSDL? 115
Why WSDL? 116
The Format of WSDL Documents 117
WSDL Types 118
WSDL Messages 118
Table of Contents
[ iii ]
WSDL Port Types 119
WSDL Binding 120
WSDL Service 121
NetBeans Support for Creating WSDL Documents 121
NetBeans Support for Editing WSDL Documents 125
Refactoring of WSDL Entities 129
Building a Simple Contract First Web Service 130
Summary 140
Chapter 7: XML Schema Designer 141
What are XML Schemas? 142
NetBeans Support for XML Schema Documents 145
Source View 147
Schema View 148
Design View 150
Uses of Elements 153
XML Schema Design Patterns 154
Summary 157
Chapter 8: Intelligent Event Processor 159
Need for Event Processing Tools 160
IEP Service Engine 162
Continuous Query Language (CQL) 164
The IEP Editor and Palette 165
Validating Event Processors 171
Operators Input and Output Types 172
Testing IEP Projects 173
Summary 178
Chapter 9: Handling Events 179
Fault Handling Within WSDL Documents 180
BPEL Handlers 184
Fault Handlers 184
Event Handlers 192
Compensation Handlers 196
Termination Handlers 197
Summary 197
Chapter 10: Building a Sample Application 199
About the Sample Application 200
Getting Started 202
Creating Partner Services 203
Creating the BPEL Process 208
Creating a Composite Application 223
Table of Contents
[ iv ]
Part A - The Approach 224
Testing Part A Source 229
Part B – Using Multiple Partners 231
Testing Part B Source 239
Part C – Writing to File 240
Testing Part C Source 247
Part D – Sending JMS Messages 247
Testing Part D Source 251
Part E – Conditions and Sequence 252
Testing Part E Source 261
Part F – Sending Mails 262
Testing Part F Source 266
Part G – Event Processing 267
Summary 274
Chapter 11: Composite Applications 275
Role of Composite Applications 275
NetBeans Project Types 276
Workspace 277
Non-Hierarchical Model 279
CASA Editor 280
Summary 281
Index 283
Preface
Composite applications aid businesses by stitching together various componented
business capabilities. In the current enterprise scenario, empowering business
users to react quickly to the rapidly changing business environment is the top most
priority. With the advent of composite applications the 'reuse' paradigm has moved
from the technical aspect to the business aspect. You no longer re-use a service
but re-use a business process. Now, enterprises can define their own behaviors
optimized for their businesses through metadata and flows. This business process
composition has become increasingly important for constructing business logic.
The ability of composite applications to share components between them nullifies
the distinction between actual applications. Business users should be able to move
between the activities they need to do without any actual awareness that they are
moving from one domain to another.
The composite application design enables your company to combine multiple
heterogeneous technologies into a single application, bringing key application
capability within reach of your business user. Enterprises creating richer composite
applications by leveraging existing interoperable components increase the
development organization's ability to respond quickly and cost-effectively to
emerging business requirements. While there are many vendors offering various
graphical tools to create composite applications, this book will focus on OpenESB
and NetBeans IDE for designing and building composite applications.
This book introduces basic SOA concepts and shows how you can use NetBeans and
OpenESB tools to design and deploy a composite application. After introducing the
SOA concepts, you are introduced to various NetBeans Editors and aids that you
need to understand and work with to design a composite application. The last part
of the book deals with a full fledged incremental example on how you can build
a complex composite application with necessary screen shots accompanied by the
source code available on the website.
Preface
[  ]
What This Book Covers
Chapter 1 introduces SOA and BPEL to the readers with simple examples and gives an
overview of the JBI components and runtime required to build composite applications.
This chapter also gives you an overview of the need for SOA-based applications in
companies by depicting an example of an imaginary AirlinesAlliance system.
Chapter 2 shows you how you can quickly setup NetBeans IDE and other runtime
environments including OpenESB runtime and BPEL engine. There are many
software/tools mentioned in this chapter that you need to download and configure
to get started building composite applications using NetBeans.
Chapter 3 provides an overview of Java Business Integration (JBI) and the Enterprise
Service Bus (ESB). You will learn about JBI Service Engines and how they are
supported within the NetBeans IDE.
Chapter 4 introduces JBI Binding Components and how they provide protocol
independent communication between JBI components. You will also learn about the
support that the NetBeans IDE provides for Binding Components.
Chapter 5 introduces the NetBeans BPEL Designer that comes bundled with the
NetBeans IDE. You will also be introduced to the graphical tools/wizards and
palettes available for creating BPEL files.
Chapter 6 provides an overview of WSDL and how WSDL documents are formed.
You will learn about the use of WSDL in enterprise applications and the WSDL
editor within the NetBeans IDE
Chapter 7 covers the XML schema designer and shows how it aids rapid development
and testing of XML schema documents.
Chapter 8 provides you an overview of the Intelligent Event Processor (IEP) module
and the IEP Service Engine that can be acquired from the OpenESB software bundle.
This chapter also shows the need for an event processing tool through simple
composite application examples.
Chapter 9 provides details of fault handling within a BPEL process and shows how
these can be managed within the NetBeans IDE by using graphical tools.
Chapter 10 shows you how you can build simple to complex composite applications
and BPEL processes using the NetBeans IDE. The examples in this chapter are divided
into several parts and the source code for all parts is available in the code bundle.
Chapter 11 gives you the overall picture of the composite application and the need for
a composite application to deploy your BPEL processes. The composite application
support provided in NetBeans IDE comes with a visual editor for adding and
configuring WSDL ports and JBI modules.
Preface
[  ]
What You Need for This Book
Java SE 5 or higher
OpenESB Components
NetBeans 6 + OpenESB Addons Bundle
Who is This Book for
This book is for enterprise developers and architects interested in using NetBeans
IDE and OpenESB tools to build their SOA-based applications.
Conventions
In this book, you will find a number of styles of text that distinguish between
different kinds of information. Here are some examples of these styles, and an
explanation of their meaning.
There are three styles for code. Code words in text are shown as follows: message
sayHelloRequest has been defined
A block of code will be set as follows:
?xml version=1.0 encoding=UTF-8?
definitions name=HelloWSDL
targetNamespace=http://j2ee.netbeans.org/wsdl/HelloWSDL
xmlns=http://schemas.xmlsoap.org/wsdl/
When we wish to draw your attention to a particular part of a code block, the
relevant lines or items will be made bold:
message name=sayHelloReply
part name=outputMessage type=xsd:string/
/message
message name=sayHelloFault
part name=faultMessage type=xsd:string/
/message
New terms and important words are introduced in a bold-type font. Words that you
see on the screen, in menus or dialog boxes for example, appear in our text like this:
From the New Project wizard, select SOA | BPEL Module.
•
•
•
Preface
[  ]
Important notes appear in a box like this.
Tips and tricks appear like this.
Reader Feedback
Feedback from our readers is always welcome. Let us know what you think about
this book, what you liked or may have disliked. Reader feedback is important for us
to develop titles that you really get the most out of.
To send us general feedback, simply drop an email to feedback@packtpub.com,
making sure to mention the book title in the subject of your message.
If there is a book that you need and would like to see us publish, please send
us a note in the SUGGEST A TITLE form on www.packtpub.com or
email suggest@packtpub.com.
If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer Support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.
Downloading the Example Code for the Book
Visit http://www.packtpub.com/files/code/2622_Code.zip, and select this book
from the list of titles to download any example code or extra resources for this book.
The files available for download will then be displayed.
The downloadable files contain instructions on how to use them.
Preface
[  ]
Errata
Although we have taken every care to ensure the accuracy of our contents, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in text or
code—we would be grateful if you would report this to us. By doing this you can
save other readers from frustration, and help to improve subsequent versions of
this book. If you find any errata, report them by visiting http://www.packtpub.
com/support, selecting your book, clicking on the Submit Errata link, and entering
the details of your errata. Once your errata are verified, your submission will be
accepted and the errata added to the list of existing errata. The existing errata can be
viewed by selecting your title from http://www.packtpub.com/support.
Questions
You can contact us at questions@packtpub.com if you are having a problem with
some aspect of the book, and we will do our best to address it.
Enterprise Application
Development
Organizations are rapidly moving towards an information-driven business model
that exerts a lot of pressure on the response time. Response time is the primary issue
for organizations adopting new technologies. Any Business process model designed
by an organization should be flexible, extensible, and reliable primarily to tackle the
information burst experienced by most enterprises.
The objective of this book is to help enterprise application architects and developers
understand various Service Oriented Architecture (SOA) tools available as part
of the NetBeans IDE thus, enabling them to build an enterprise grade, scalable
application in a short period using a single development interface.
In this chapter, we will be discussing the following topics:
SOA concepts
Introduction to various BPEL Processes
Composite Applications and JBI
AirAlliance—our sample application
According to Gartner Inc., enterprises will eventually adopt SOA for their business
critical processes, sooner or later. Although architects have been discussing and
implementing SOA for the past several years, practicing SOA is still new, and
generally requires the utmost care in application design when compared to other
similar architectures. SOA always emphasizes on distributed architecture spanning
multiple web services and applications that are part of a different heterogeneous
category of applications. This in turn adds additional complexity to the whole
system. If you do not carefully connect your various business applications through a
set of well defined processes, it will lead to data chaos and breakdowns.
•
•
•
•
Enterprise Application Development
[  ]
Not all SOA implementations you see today are tuned for maximum performance.
In fact performance was always a key issue when considering SOA for business
integration. When SOA principles are applied too rigidly, you can expect some
run-time issues. Hence it is better not to go by any book or guidelines and instead, to
adopt your own SOA-based system that is scalable and reliable for your needs. The
primary factor that you need to understand is that SOA is a paradigm shift in doing
business and requires a complete comprehension of the events, processes, and fault
endpoints that occur in your enterprise.
Developing enterprise applications is much more than just building a system that
can process and share data between web services and various clients. Consider, for
example, an airlines reservation web service that processes the guest itinerary. If a
reservation cannot be made, it should have the capability of contacting a partner
airline's web service and then process the itinerary. If the itinerary processing is
successful, it should confirm the booking to the client. Now, there is more than
one type of enterprise system involved. Which part of your enterprise system will
orchestrate the transaction? Who will set the guidelines for fail-safe communication?
There is a clear need for a middle man or a centralized web service to orchestrate
these disparate web services to make the reservation process successful and fail-
safe. BPEL (Business Process Execution Language) is widely accepted as an industry
standard for orchestrating web services to perform meaningful business processes.
This book focuses on using a particular BPEL implementation for solving business
integration problems. This implementation is the BPEL Service Engine from the
OpenESB project at https://open-esb.dev.java.net/.
Project OpenESB implements an Enterprise Service Bus runtime using Java Business
Integration (JBI) as the base. This allows easy integration of web services to create
loosely coupled enterprise class composite applications.
SOA and POA
Today, most companies are considering SOA and web services as a viable business
process model to address the integration needs for building a robust enterprise
application. While SOA has become a model to implement and solve integration
problems, many companies are still confused about implementing SOA as there
appear to be a myriad of ways to implement an SOA-based model. Also there are
companies that already have a time tested solution implemented and would like
to move to the much extensible SOA model. SOA and POA based applications
enable businesses by leveraging existing web services and by minimizing the cost of
deploying new services.
Chapter 1
[  ]
The primary objective of designing an enterprise application is to glue together
different services to suit a particular business need. However, there is a bigger
challenge involved in designing this whole system wherein introducing new services
or modifying existing services should not affect the system to a larger extent. This
can only be achieved when you have a set of business processes that can orchestrate
the system, making the services communicate with each other at the right time.
Hence, orchestrating services through BPEL has become a much acclaimed solution
for designing enterprise applications. BPEL is emerging as the clear standard for
composing multiple synchronous and asynchronous services into collaborative and
transactional process flows.
Web Service
Web Service
Service
Orchestration Point
Client
Web Service
Well designed SOA-based applications reduce the cost and complexity of
implementing business processes that cater to all the connected partners including
customers, suppliers, and other clients. Prior to the SOA-based model, many
businesses found this objective almost unattainable, because technical roadblocks
made it difficult to offer a business process as a service that could be universally
shared by its target community of users. The Web has demonstrated that universal
access is not only possible but is now a fact of business life, and has proven that a
combination of open protocols, tools, and infrastructure can create great value for the
business community. The SOA extends this value to cover the creation and sharing
of business processes, utilizing web protocols, tools, and infrastructure to meet this
new objective. The challenge is to find the Service Orchestration Point for hosting
the business processes that interact with heterogeneous services and provide a
seamless and quick solution to the customers.
Enterprise Application Development
[ 10 ]
Introduction to Various BPEL Processes
A business process is the procedure that an organization uses to achieve a larger
business goal. A business process is actually a series of individual tasks, and
each task is executed in a specific order. Business Processes are synchronous or
asynchronous, depending on the method you choose to invoke your business
process. A synchronous business process can contain asynchronous operations, but
they must be added after the starting event in the process flow. That is, at runtime
the processes are executed after the synchronous starting event is complete.
As an integral part of the NetBeans SOA tools, business processes provide the
primary means through which enterprise services are integrated. NetBeans SOA
tools features the BPEL Designer, which has been formulated so that architects can
easily create complex composite applications involving web services without much
programming effort. To this end, you can easily create and develop a business
process in an intuitive graphical programming environment called the BPEL
Designer and deploy it to a separate runtime environment for execution. This
runtime is the OpenESB runtime that is integrated with the GlassFish
application server.
The BPEL Process starts with a receive activity, proceeds with invoking external
services and finishes by replying back to the Client. A BPEL process typically
interacts with one or more external Web Services (the BPEL process is also a web
service). These external web services are called partner services.
Chapter 1
[ 11 ]
The above figure shows a preview of how a simple BPEL process can be designed
using the NetBeans BPEL Designer. In the above example, there are two partner
services, one is the BPEL client implementation and the other one is the web service
EJB implementation which has one operation processItinerary.
In order to understand the simple BPEL process, let us define some of the terms most
commonly used while designing a BPEL process.
Partner ��������
Services
Any external service or client that interacts with the BPEL process is called a partner
service. A process starts and ends somewhere, and involves the interaction of at least
one other outside partner. In the above example, the partner is the web service that
has the ability to process the client's request. The customer sends the guest itinerary
for processing. The BPEL process receives the itinerary, invokes a web service that
processes the itinerary, and returns the itinerary back to the customer. This simple
process helps us understand the BPEL activities that we will focus on later in this book.
Enterprise Application Development
[ 12 ]
Refer to Chapter 10 to learn how partner services can be designed and created
using NetBeans.
Activities
Activities are the individual business tasks within the process that compose the
larger business goal. In the previous screenshot, activities represent each step in the
process. Thus the most common activities are Receive, Invoke, Assign, and Reply.
For more information on the BPEL activities supported in the BPEL Designer, refer
to Chapter 5.
Variables
In the previous example, between the Receive and the Invoke activity, we are
assigning the guest itinerary elements to a new variable. (Assigning Guest name,
travel date, preferred class.) This is basically a copying process (creates an XPath
expression in the BPEL file) and it can be done visually using the NetBeans BPEL
Mapper (explained in Chapter 5). Variables store the data that are used by the
business process.
As we discussed earlier, the partner service interacts with the business process for
the purpose of receiving a message in response to a request.
Customer
Enumerate the list of airlines
Reservation Request
Reservation Confirmation
Pause
Airlines
The above figure depicts a typical asynchronous and synchronous business process.
An asynchronous process is used when the BPEL process is long-running. The
results are returned to the client by performing an invocation on the client. Thus the
customer asks for reservation and disconnects. The business process processes the
requests and gets back to the customer. It is more like a Leave a message and we
will get back to you kind of setup. This pause does not happen with a synchronous
business process, wherein the customer waits indefinitely to get the response. A
classic example is the reservation process.
Chapter 1
[ 13 ]
However, there is a caveat here. The BPEL process is shared and is not a singleton.
Many customers work with the same business process. There should be a way for the
business process to identify its customers.
Customer
NA. Itinerary Number
Provide
Process Reservation
Reservation Confirmation
Send Itinerary Number
Pause
Airlines
The above figure depicts an example wherein the customer sends a reservation
request for a particular airlines' destination on a particular date. The business
process, after communicating with the airlines' web service, finds out the reservation
cannot be processed. Hence it updates the customer itinerary with an itinerary
number that the customer can use later to send the reservation request.
This is how a correlation is used by the business process, to distinguish the customer
in their initial interaction so that they can recognize each other in the future. A
correlation is the record that the business process uses to keep track of multiple
partners in the same business process. NetBeans BPEL Designer lets you set
correlations for Invoke activities through a visual interface as discussed later
in this book. Note that the business process is able to manage multiple tasks, and
does not hang in a single business process waiting for it to conclude at the expense
of all other activities. Instead, while they are waiting for the itinerary number to
arrive, the process conducts similar business, using the same business process with
other customers.
Since multiple clients can use the same business process, it is possible that each
application implementation may desire slight variations of the same business
process. Therefore, it is important that business processes have points-of-variability.
Thus giving the user of the composite application the ability to configure the
business process to their specific requirements.
Enterprise Application Development
[ 14 ]
A Business process can also be abstract in the sense that the appropriate business
logic to make decisions is defined, but the sensitive information needed to choose a
course of action is hidden from the process partners. An abstract process is basically
a description of a business process, and cannot be run on the server, unlike an
executable business process. We will discuss these processes in the coming chapters.
Consider the following guidelines for creating BPEL processes:
Support multiple clients—your business process should be able to process
multiple clients simultaneously. So make sure that you have correlations set
on messages.
Intelligent event processing—you need a real-time business event collection
and processing mechanism to create an efficient process.
Secure your business processes—we are talking about enterprise systems.
You had better secure your business processes. This is quite easy using the
Identity enabled web services support in NetBeans.
Create re-usable partner services—make sure that partner services are
reusable and can be used across different business processes. For example,
the getItinerary operation of an airlines web service will be used by multiple
business processes.
Why do you need to consider BPEL for orchestration? In a complex business
transaction, just developing web services and exposing their functionalities over
WSDL is not enough. Sequence of execution and branching in case of failures
and other events are critical to business transactions. Sequencing and conditional
behavior are the strengths of BPEL.
BPEL does the following for your business transactions:
1. Coordinates asynchronous communication between different web services.
A client requests for a flight reservation and the BPEL process interacts with
various partner services to process the reservation.
2. Manipulates data before exchanging between different services. The BPEL
process can check, verify, and modify data from the client before sending
requests to partner services. A classic example of data manipulation is an
intelligent event processing mechanism.
•
•
•
•
Chapter 1
[ 15 ]
3. Conditional and parallel processing is possible with BPEL services. If a
reservation with one airline is not available, the BPEL process can send the
reservation request to another partner airlines web service.
4. BPEL process can undo or compensate at any state in its life cycle.
5. Support long running business processes.
Composite Applications and JBI
A composite application is an accepted solution that addresses a specific business
problem by bringing together business logic and data sources from multiple
underlying systems. Typically a composite application will be associated with one or
many business processes, and may bring together several process steps, presenting
them to the client through a single interface that is customized to the requirements of
the business need.
SOA describes a category of composite applications composed of service provider
and service consumer components that segregates business logic and offers location
transparency for the service providers and consumers. The SOA approach lets you
replace or upgrade individual components in the application without affecting
other components or the process as a whole. Moreover, you can independently
specify alternative paths through which the components in the application exchange
messages. The next couple of chapters in this book provide concepts and constructs
needed for building a composite application using the NetBeans SOA tools.
Our example application that we will be creating in this book is finally deployed as a
Java Business Integration (JBI) module in the JBI Runtime Environment provided by
GlassFish application server.
JBI runtime is integrated with Sun Java System Application Server and
the open-source GlassFish application server. This is the same JBI runtime
that was available as part of OpenESB project. OpenESB is also available
as an add-on in the Java Application Platform SDK.
The OpenJBI Components project on java.net is an incubator project
started to foster community-based development of JBI components that
conform to the Java Business Integration specification (JSR 208).
Enterprise Application Development
[ 16 ]
JBI is integrated with Sun Java System Application Server as a pre-configured
lifecycle module, which means that whenever the application server's instance starts
up, the JBI runtime will be available.
Client
JBI Message
Router
HTTP/SOAP Binding
Component
Application Server Bridge
Application Server
8
7
9
6
5
10
4
3
12
11
2
13
1
14
Java EE Service
Engine
BPEL
Service Engine
JBI Runtime Environment
There is no user interaction required to configure or start the JBI runtime. It is just
like any other service of the application server. Java EE Service Engine acts as
the bridge between Java EE applications and JBI. A Java EE application archive
(ear/war/jar) can be packaged in a JBI composite application and deployed as
one single entity. Service units belonging to other JBI components and Java EE
applications can share the same transaction and security contexts. JBI is built on a
web services model, and provides a pluggable architecture for a container that hosts
service producer and consumer components. Client and services connect to the
container via binding components or can be hosted inside the container as part of a
service engine.
Chapter 1
[ 17 ]
Java Business Integration (JBI) is a Java standard (JSR 208) for structuring
business integration systems along SOA lines. It defines an environment
for plug-in components that interact using a services model based directly
on WSDL 2.0.
Project OpenESB is an open-source implementation of JBI. It extends the
JBI specification by creating an enterprise service bus (ESB) from multiple
JBI instances. The instances are linked by a proxy-binding based on JMS.
This allows components in separate JBI instances to inter-operate in the
same fashion as local ones.
JBI defines standard packaging for composite applications that are composed
of service consumers and providers. Individual service units are deployable to
components; groups of components are gathered together into a service assembly.
The service assembly includes metadata for bonding the service units together, as
well as bonding service units to external services. This provides a simple mechanism
for performing composite application assembly using services.
AirAlliance Company
All that we have discussed so far is the general principles of SOA and BPEL
based business processes. To make things a little easier, we will attempt to discuss
various concepts covered in this book in the context of an imaginary airline called
AirAlliance.
The Problem
AirAlliance is the largest airline with 64 partner airlines working across 124
countries. AirAlliance attempts to build an enterprise application wrapper on top
of the 64 partner airlines web services so that travel reservation can be made across
airlines from a single web interface. The challenge is to build BPEL processes that
orchestrate different partner services to provide a seamless travel experience to
the customers.
The problem is how to build a global airline alliance enterprise system that offers
customers worldwide reach and a smooth travel experience. For the customer
querying on the flight status, baggage transfer, connection information and other
itinerary related information is through a single interface that connects to the
AirAlliance Web Service (BPEL Process). The itinerary processing and airlines
querying happens transparently.
Enterprise Application Development
[ 18 ]
Look at the following figure that depicts a simple business process:
Guest Itinerary
Process
Itinerary
Yes
Yes
No
No
NorthAir WS
SA-Check
Availability
NA-Check
Availability
Process Reservation
Update
Itinerary
Sync.
DB
Return Itinerary
SouthAir WS SA DB
NA DB
The client sends the Guest Itinerary for reservation processing. The business process
enumerates the travel preferences. These include the travel date, food preference,
seating preference, and information like maximum travel stop overs. It then finds a
suitable airline that matches the customer's preference. The above business process
does an availability check on partner airlines based on the travel preference. It then
updates the itinerary and sends it back to the client. Finally the airline's DBs are
synced to reflect the current seat status.
Note that NorthAir Web Service and SouthAir Web Service work independently of
each other and need not know that they are part of a business process or that they
are being orchestrated. This kind of process can be implemented in BPEL easily.
Throughout Chapter 10, we will discuss various business processes examples.
Chapter 1
[ 19 ]
In all the chapters of this book, we will use the same company as an example
(AirAlliance) and will design solutions to improve the architecture of our company.
The Enterprise Stack
Before proceeding with a solution for the AirAlliance problem, you need to
understand the tools stack that will be used in this book. Let us briefly discuss the
enterprise tools. In the following figure, the left side shows the tasks that you are
most likely to perform and the right side shows the tools that you use to perform
those tasks. The AirAlliance company collaborates with many partner airlines
through their web services. For designing and building web services, we'll be using
the NetBeans IDE's web service creation methods. For simplicity, all our airlines web
services are deployed as a stateless session beans.
Enterprise Application Development
[ 20 ]
Once you have the partner services ready, you will build the business processes that
interact with the partner services. Our business processes are implemented as BPEL
processes. There could be BPEL processes for each operation like Reservation BPEL
Process, Flight Information Business Process and Baggage Information Business
Process. We use the NetBeans IDE's BPEL Designer that comes with the NetBeans
Enterprise Pack for designing these processes.
When we have the business processes ready, we create JBI Modules so that they
can be deployed as a service assembly in the BPEL Engine. We use NetBeans's
Composite Application Module to build these deployable applications. Based
on the need, we might use the CASA Editor to edit the Composite Applications'
deployment descriptors. When we have the deployable enterprise application, we
deploy them to the Glassfish's BPEL Engine as a Service Assembly.
There is a robust visual tool for monitoring the business processes, message
transaction and status through a BPEL Process Monitor. You can also use the Java DB
for storing airline information. NetBeans has very good support for managing the
Java DB from the IDE.
So these are the required tools to get you started with building your
enterprise applications.
Summary
This chapter provided an overview of SOA and the need for SOA in enterprise
applications. SOA will mean different integration patterns to different companies.
There is not a single implementation of SOA that can be termed the best.
Implementing SOA in your enterprise applications depends mostly on your
business requirements.
BPEL is widely accepted as the means to orchestrate disparate web services
to conceive meaningful business processes. What BPEL does to your business
transaction is explained in this chapter with an imaginary airline. This chapter also
dealt with the need for SOA tools for rapidly building and deploying enterprise
grade applications. The tools used in this book are shipped with the NetBeans IDE
and the OpenESB 2.0 bundle.
The next couple of chapters introduce the NetBeans SOA Tools and the NetBeans
IDE and highlight various features and functionalities of the SOA Tools. Some of
these are the BPEL Designer, Activities Palette, BPEL Mapper, and XML Schema
Editors. All of them are available as part of the OpenESB-NetBeans bundle. Chapter
2 deals with the information that you need to quickly get started with these tools.
Getting Started
In Chapter 1, we discussed some general SOA concepts related to building scalable
enterprise applications. As we discussed earlier, there could be different ways of
implementing enterprise applications using different tools available in the market.
In this book, we will restrict our views on SOA to designing web services and focus
on the BPEL orchestration to perform complex business processes. We will build
Java EE-based web services and BPEL-based processes using the NetBeans IDE and
SOA tools available with NetBeans. Any detailed discussion on any tool, apart from
the SOA tools, could be considered as out of the scope for this book and is left to the
reader to compare and understand the differences.
In this chapter, we will discuss:
Getting the software
Setting up the environment
NetBeans projects
Enterprise tools and editors
Getting the Software
For enterprise application development using Java EE and web services, the most
commonly used IDE is the NetBeans IDE. We can obtain the NetBeans IDE as a
built-in feature in the following software:
NetBeans IDE 6.0
OpenESB
•
•
•
•
•
•
Getting Started
[ 22 ]
NetBeans IDE 6.0
You need to install NetBeans IDE 6.0 or higher to have the base IDE for creating Java
EE-based web services. The software can be obtained from http://www.netbeans.
org. Just follow the links specific to a version. NetBeans IDE 6.0 comes with SOA
capabilities and includes the GlassFish Application Server. NetBeans SOA tools
contains open-sourced features from Sun's Java Studio Enterprise and Java CAPS
products, as well as new features for creating composite applications, BPEL-based
web services, secure Java EE web services, and XML artifacts like XML schema and
WSDL. With these tools, you should be able to:
Visually Design: You will be able to visually design an XML schema and
visualize BPEL-based orchestration of web services using a flowchart-like
interface. Here you can concentrate on the design part while the IDE bothers
with the syntax and specification compliance.
Test: You should be able to test your composite applications without leaving
your design and development environment. In other words, a single interface
for building, testing, and deploying enterprise applications.
Secure Applications: You should be able to secure your enterprise
application using available identity solutions and built-in IDE tools.
Integrated BPEL Engine: You don't need a standalone application server for
deploying your web services. Most popular applications servers, including
GlassFish Application Server and the Sun Java System Application Server,
can be integrated and managed from the IDE. BPEL Engine is available as a
JBI Service Engine on both the servers.
OpenESB
You can also download the OpenESB bundle from the OpenESB project site:
https://open-esb.dev.java.net. The OpenESB bundle includes NetBeans IDE 6.0
along with GlassFish Application Server, SOA tools, and JBI components.
The following table compares the NetBeans 6.0 bundle and the OpenESB 2.0 bundle:
Functionality NetBeans 6.0 bundle OpenESB 2.0 bundle
BPEL–Support for BPEL-based business
processes—you can use the BPEL Designer
to design and implement processes that can
orchestrate Java EE-based web services.
Yes Yes
•
•
•
•
Chapter 2
[ 23 ]
Functionality NetBeans 6.0 bundle OpenESB 2.0 bundle
Composite Applications Support—BPEL
Modules can be combined into a composite
application and can be deployed as a
composite application to a JBI runtime.
Yes Yes. Support for
editing composite
applications.
Intelligent Event Processing—real-time
business event collection and processing.
No Yes
Editing XSLT Yes Yes
Editing WSDL Yes Yes
We recommend that you go with OpenESB 2.0 bundle
Setting up the Environment
In this book, we will assume that you have already installed the NetBeans IDE.
If you need help installing the NetBeans IDE, visit the NetBeans site at
http://www.netbeans.org/.
When you configure your environment successfully as per the installation document,
clicking on Servers in the Services tab will show you a list of available servers.
Right-click on GlassFish and select the Start option. This will initiate the GlassFish
startup process, which you will be able to see in the output screen. After GlassFish
Server is started, expand JBI | Service Engines and verify sun-bpel-engine and
other engines shown as follows:
Getting Started
[ 24 ]
NetBeans SOA bundle installs and configures the bundled GlassFish Application
Server and Sun Java System Access Manager. You need Sun Java System Access
Manager for managing identities.
When GlassFish Application Server is started, the BPEL Service Engine may not be
started automatically. However, when you deploy your first composite application,
the BPEL service engine starts automatically.
If you experience problems while installing or running the software, see the
list of issues for workarounds and known issues in the Release Notes at
http://www.netbeans.org/community/releases/60/relnotes.html.
Now that we have both the GlassFish Application Server and the IDE environment
setup, we need to start the Java DB database and check to see if we can connect to
any default DB. Use Tools | Java DB Database | Start Java DB Server to start the
integrated Java DB Server.
Some of the examples we build in this book use the Java DB as the data store. You
can use any JDBC-compliant DB for your projects. Starting from NetBeans 6.0, you
can also connect to PostgreSQL DB, which is most widely used by the community.
Java DB has an advantage of being completely managed from the NetBeans
run-time environment.
Chapter 2
[ 25 ]
NetBeans Projects
NetBeans add-ons are pieces of software that extend the functionality of the base
IDE. When NetBeans is installed with the SOA options, New Project types are
created that allow you to work with a specific enterprise artifact. The general
categories of NetBeans projects include Web, Enterprise, SOA, NetBeans Modules,
Java, JBI Components.
Getting Started
[ 26 ]
The NetBeans IDE offers comprehensive GUI support for building enterprise
applications and rich client applications on the NetBeans platform. Throughout
this book, we will be creating projects that belong to the Web, Enterprise, and SOA
categories. Starting from NetBeans 6.0, the following project types are supported:
1. BPEL Module: This project lets you create a BPEL Module that can hold
one or more BPEL processes. Refer to Chapter 5 on BPEL Designer for
more information.
2. IEP Module: This project lets you create an Intelligent Event Processing
Module, which may contain one or more intelligent event processors. The
IEP Module Projects works with Service Oriented Architecture or Composite
Application projects to generate service engine deployment assembly for
event processor deployment. Refer to Chapter 8 on IEP for more information.
3. Composite Application: This project lets you create a Composite
Application project, which may include one or more BPEL Modules, and
other types of Java Business Integration (JBI) modules.
4. SQL Module: You can create a CAPS SQL Module project from this option.
5. XSLT Module: Creates an empty XSLT Module project, which may contain
multiple XSLT services.
We will not be exploring other project types in order to restrict the focus of this book
to BPEL.
Summary
This chapter gave a detailed explanation about the software required for working
with this book along with the installation instructions. The next chapter describes the
Service Engines and other JBI components supported by OpenESB NetBeans bundle.
Service Engines
In Chapter 1, we introduced the concept of SOA applications, and introduced
BPEL processes and JBI applications. To gain a greater understanding of these
concepts and to enable us to develop enterprise level SOA applications, we need to
understand JBI in further depth, and how JBI components can be linked together.
This chapter will introduce the JBI Service Engine and how it is supported within the
NetBeans Enterprise Pack.
In this chapter, we will discuss the following topics:
Need for Java Business Integration (JBI)
Enterprise Service Bus
Normalized Message Router
Introduction to Service Engines
NetBeans Support for Service Engines
BPEL Service Engine
Java EE Service Engine
SQL Service Engine
IEP Service Engine
XSLT Service Engine
Need for Java Business Integration (JBI)
To have a good understanding of Service Engines (a specific type of JBI component),
we need to first understand the reason for Java Business Integration.
•
•
•
•
•
•
•
•
•
•
Service Engines
[ 28 ]
In the business world, not all systems talk the same language. They use different
protocols and different forms of communications. Legacy systems in particular can
use proprietary protocols for external communication. The advent and acceptance of
XML has been greatly beneficial in allowing systems to be easily integrated, but XML
itself is not the complete solution.
When some systems were first developed, they were not envisioned to be able
to communicate with many other systems; they were developed with closed
interfaces using closed protocols. This, of course, is fine for the system developer,
but makes system integration very difficult. This closed and proprietary nature
of enterprise systems makes integration between enterprise applications very
difficult. To allow enterprise systems to effectively communicate between each other,
system integrators would use vendor-supplied APIs and data formats or agree on
common exchange mechanisms between their systems. This is fine for small short
term integration, but quickly becomes unproductive as the number of enterprise
applications to integrate gets larger. The following figure shows the problems with
traditional integration.
As we can see in the figure, each third party system that we want to integrate with
uses a different protocol. As a system integrator, we potentially have to learn new
technologies and new APIs for each system we wish to integrate with. If there are
only two or three systems to integrate with, this is not really too much of a problem.
However, the more systems we wish to integrate with, the more proprietary code we
have to learn and integration with other systems quickly becomes a large problem.
To try and overcome these problems, the Enterprise Application Integration (EAI)
server was introduced. This concept has an integration server acting as a central
hub. The EAI server traditionally has proprietary links to third party systems, so the
application integrator only has to learn one API (the EAI server vendors). With this
architecture however, there are still several drawbacks. The central hub can quickly
become a bottleneck, and because of the hub-and-spoke architecture, any problems
at the hub are rapidly manifested at all the clients.
Chapter 3
[ 29 ]
Enterprise Service Bus
To help solve this problem, leading companies in the integration community
(led by Sun Microsystems) proposed the Java Business Integration Specification
Request (JSR 208) (Full details of the JSR can be found at http://jcp.org/en/jsr/
detail?id=208). JSR 208 proposed a standard framework for business integration
by providing a standard set of service provider interfaces (SPIs) to help alleviate the
problems experienced with Enterprise Application Integration.
The standard framework described in JSR 208 allows pluggable components to be
added into a standard architecture and provides a standard common mechanism for
each of these components to communicate with each other based upon WSDL. The
pluggable nature of the framework described by JSR 208 is depicted in the following
figure. It shows us the concept of an Enterprise Service Bus and introduces us to the
Service Engine (SE) component:
JSR 208 describes a service engine as a component, which provides business
logic and transformation services to other components, as well as consuming
such services. SEs can integrate Java-based applications (and other resources), or
applications with available Java APIs.
Service Engine is a component which provides (and consumes) business
logic and transformation services to other components. There are
various Service Engines available, such as the BPEL service engine
for orchestrating business processes, or the Java EE service engine for
consuming Java EE Web Services. We will discuss some of the more
common Service Engines later in this chapter.
Service Engines
[ 30 ]
The Normalized Message Router
As we can see from the previous figure, SE's don't communicate directly with each
other or with the clients, instead they communicate via the NMR. This is one of the
key concepts of JBI, in that it promotes loose coupling of services.
So, what is NMR and what is its purpose? NMR is responsible for taking messages
from clients and routing them to the appropriate Service Engines for processing.
(This is not strictly true as there is another standard JBI component called the Binding
Component responsible for receiving client messages. Binding Components are
discussed in Chapter 4. Again, this further enhances the support for loose coupling
within JBI, as Service Engines are decoupled from their transport infrastructure).
NMR is responsible for passing normalized (that is based upon WSDL) messages
between JBI components. Messages typically consist of a payload and a message
header which contains any other message data required for the Service Engine to
understand and process the message (for example, security information). Again, we
can see that this provides a loosely coupled model in which Service Engines have no
prior knowledge of other Service Engines. This therefore allows the JBI architecture
to be flexible, and allows different component vendors to develop standard
based components.
Normalized Message Router enables technology for allowing messages to
be passed between loosely coupled services such as Service Engines.
The figure below gives an overview of the message routing between a client
application and two service engines, in this case the EE and SQL service engines.
Chapter 3
[ 31 ]
In this figure, a request is made from the client to the JBI Container. This request
is passed via NMR to the EE Service Engine. The EE Service Engine then makes
a request to the SQL Service Engine via NMR. The SQL Service Engine returns a
message to the EE Service Engine again via NMR. Finally, the message is routed back
to the client through NMR and JBI framework. The important concept here is that
NMR is a message routing hub not only between clients and service engines, but also
for intra-communication between different service engines.
The entire architecture we have discussed is typically referred to as an Enterprise
Service Bus.
Enterprise Service Bus (ESB) is a standard-based middleware architecture
that allows pluggable components to communicate with each other via a
messaging subsystem.
Now that we have a basic understanding of what a Service Engine is, how
communication is made between application clients and Service Engines, and
between Service Engines themselves, let's take a look at what support the NetBeans
IDE gives us for interacting with Service Engines.
Service Engine Life Cycle
Each Service Engine can exist in one of a set of predefined states. This is called the
Service Engine life cycle.
Started
Stopped
Shutdown
Uninstalled
The figure below gives an overview of the life cycle of Service Engines:
•
•
•
•
Service Engines
[ 32 ]
Service Engines can be managed from the command line utility, asadmin, that is
supplied as part of the Sun Java System Application Server. The table below shows
some of the common commands that can be used to manage Service Engines:
asadmin list-jbi-
service-engines
Obtains a list of installed Service Engines
$./asadmin list-jbi-service-engines
sun-aspect-engine
sun-bpel-engine
sun-dtel-engine
sun-etl-engine
sun-iep-engine
sun-javaee-engine
sun-script-engine
sun-sql-engine
sun-wlm-engine
sun-xslt-engine
Command list-jbi-service-engines executed
successfully.
asadmin show-jbi-
service-engine
Shows the status of an installed Service Engine
$./asadmin show-jbi-service-engine sun-
bpel-engine
Component Information
---------------------
Name : sun-bpel-engine
State : Shutdown
Description : This is a bpel service
engine.
asadmin start-jbi-
component
Starts a Service Engine
$./asadmin start-jbi-component sun-bpel-
engine
Started component sun-bpel-engine.
asadmin stop-jbi-
component
Stops a Service Engine
$./asadmin stop-jbi-component sun-bpel-
engine
Stopped component sun-bpel-engine.
Chapter 3
[ 33 ]
Service Engines can also be managed from within the NetBeans IDE instead of using
the asadmin application. We will look at that in the next section.
Service Engines in NetBeans
As we discussed in Chapter 2, the NetBeans Enterprise Pack provides a version of
the Sun Java System Application Server 9.0 which includes several Service Engines
from the Open ESB project.
All of these Service Engines can be administered from within the NetBeans IDE
from the Services explorer panel. Within this panel, expand the Servers | Sun Java
System Application Server 9 | JBI | Service Engines node to get a complete list of
Service Engines deployed to the server.
Service Engines
[ 34 ]
The NetBeans Enterprise Pack 5.5 and the NetBeans 6.0 IDE have different Service
Engines installed. The following table lists which Service Engines are installed in
which version of the NetBeans Enterprise Pack:
Service Engine Name Description NetBeans 6.0 NetBeans 5.5
sun-aspect-engine Aspect Service Engine Yes No
sun-bpel-engine BPEL Service Engine Yes Yes
sun-dtel-engine DTEL Service Engine Yes No
sun-etl-engine ETL (Extract, Transform
and Load) Service Engine
Yes No
sun-iep-engine IEP (Intelligent Event
Processor) Service Engine
No No
sun-javaee-engine Java EE Service Engine Yes Yes
sun-script-engine Scripting Service Engine Yes No
sun-sql-engine SQL Service Engine Yes No
sun-wlm-engine WLM (Work List
Manager) Service Engine
Yes No
sun-xslt-engine XSLT Service Engine Yes No
In the previous section, we discussed the life cycle of Service Engines and how this
can be managed using the asadmin application. Using the NetBeans IDE, it is easy to
manage the state of a Service Engine. Right-clicking on any of the Service Engines
within the Services explorer shows a menu allowing the life cycle to be managed as
shown in the figure below:
To illustrate the different states in a Service Engine life cycle, a different icon
is displayed:
Chapter 3
[ 35 ]
Start
Stop
Shutdown
Uninstalled The service engine is not displayed in the list.
Now that we have a good understanding of what Service Engines are, and what
support the NetBeans IDE provides, let's take a closer look at some of the more
common Service Engines provided with the NetBeans Enterprise Pack.
BPEL Service Engine
Similar to all the other Service Engines deployed to the JBI Container within the Sun
Java System Application Server and accessible through NetBeans, the BPEL Service
Engine is a standard JBI Compliant component as defined by JSR 208.
The BPEL Service Engine enables orchestration of WS-BPEL 2.0 business processes.
This enables a work flow of different business services to be built as shown in the
following figure:
Service Engines
[ 36 ]
Within NetBeans, we can create BPEL modules which consist of one or more BPEL
processes. BPEL modules are built into standard JBI component, and then deployed
to the JBI container where the BPEL Service Engine allows the processes within the
module to be executed. In JBI terms, this is called a Service Unit.
A Service Unit is a deployable component (jar file) that can be deployed to
a Service Engine.
New BPEL modules are created in NetBeans by selecting the File | New Project
menu option and then selecting BPEL Module from the SOA category as shown in
the following figure:
Chapter 3
[ 37 ]
Within a BPEL module project, we add BPEL Processes. These processes describe the
orchestration of different services.
All the standard operations specified by WS-BPEL 2.0 Specification (like Providing
and Consuming Web Services, Structuring the processing logic, and performing
basic activities such as assignments and waiting) are available within the BPEL
Service Engine. The NetBeans designer provides simple drag-and-drop support for
all of these activities.
Consider, for example, a service for generating license keys for a piece of software. In
a Service Oriented Architecture, our system may consist of two services:
1. A Customer Service: this service would be responsible for ensuring that
license requests are only made by valid customers.
2. A License Generation Service: this service would be responsible for
generating valid license keys.
Within NetBeans, we can create a BPEL process that ties these services together
allowing us to return valid license keys to our customers and details of purchasing
options to non-customers.
Service Engines
[ 38 ]
Java EE Service Engine
The Java EE service engine acts as a bridge between the JBI container allowing
Java EE web services to be consumed from within JBI components. Without the
Java EE service Engine, JBI components would have to execute Java EE Web Services
via remote calls instead of via in-process communication. The Java EE Service
Engine allows both servlet and EJB-based web services to be consumed from
within JBI components.
The Java EE Service Engine provides several benefits when executing Java EE
Web Services.
Increased performance
Transaction support
Security support
These are explained in the following subsections.
•
•
•
Chapter 3
[ 39 ]
Increased Performance
Using the Java EE service engine enables Java EE web services to be invoked in
process within the same JVM, as the services are running. This eliminates the need
for any wire-based transmission protocols and provides increased performance.
Transaction Support
Using an in-process Communication Model between Java EE Application Server and
JBI container allows both web services and JBI modules to use the same transaction
model. Through multiple web service calls and calls to other JBI modules. For
example, BPEL processes can all use the same transaction.
Security Support
When executing Java EE Web Services from within the JBI container, the Java EE
Service Engine allows security contexts to propagate between components. This
removes the need to authenticate against each service.
SQL Service Engine
SQL service engine allows SQL statements to be executed against relational
databases and allows the results of SQL statements to be returned to the client
application or other Service Engines for further processing.
SQL service engine allows SQL DDL (Data Definition Language), SQL DML (Data
Manipulation Language), and stored procedures to be executed against a database.
This, therefore, allows different scenarios to be executed against the database. For
example, obtaining a customer's address or the number of outstanding invoices a
customer may have.
Within NetBeans, the SQL module is used to interact with the SQL Service Engine.
The SQL module project consists of three artifacts as follows:
configuration xml file (connectivityInfo.xml)
one or more SQL files containing distinct SQL statements
WSDL file describing the SQL operations.
•
•
•
Random documents with unrelated
content Scribd suggests to you:
mutual faith by a single doubt. I have given him my confidence, and
that was all I had to bestow.
Well! as some sensible poet remarks, and I quite agree with him,
said Agnes, with a peevish, discontented sigh—
The maid that loves,
Goes out to sea upon a shattered plank,
And puts her trust in miracles for safety.
No, Agnes! Those who have loved lightly may change as lightly, but
I should little deserve the inestimable happiness of having known Mr.
Granville so entirely, did I not always believe him above the
suspicion of caprice. We have read each other's mind and heart, we
have been willing to trust each other in life and till death; therefore
now, unless Richard were to tell me with his own lips that he had
changed, I would not believe it,—and scarcely even then! This alone
is affection that deserves the name, not to torment him with
distrust, nor to take up the first cause of offence, but with
unenquiring confidence to judge him as I would myself be judged. It
would add a pang to the sorrow of separation if we believed
ourselves at the mercy of every idle suspicion; but I know his heart
to be as incapable of deceit or dishonor as my own.
In the mean time, Mr. Granville had continued to write from abroad
with unceasing assiduity, believing that some unexpected obstacle
must have occurred to prevent Marion from answering his letters,
but never suspecting that she did not receive one of the many he
had written. In his candid and elevated mind, there was no room for
jealousy or suspicion, and conscious that the transparent nature of
Marion's nature admitted of no concealments, he rejected every
angry or impatient thought. The more he saw of other society, the
more dear she became to his memory now, while his attachment
was of that deep and lasting kind over which the accidents of life
have no influence.
Miss Dunbar, said Captain De Crespigny, one evening, placing
himself on a sofa beside Marion, while Sir Patrick, to whom he had
been speaking very earnestly some minutes before, anxiously
watched her countenance from a distance: I wish you were now
seated in one of Merlin's chairs, from which no one can rise till a
story be finished. I have something to say, so important to myself,
and let me hope also to you, that I expect to be heard to the end.
Of course, if you wish it, replied Marion, in a faltering, agitated
voice. But, Captain De Crespigny, allow me to remark how unlikely
it is that any subject can very deeply interest us both. I trust and
hope we fully understand each other.
It is time, indeed, that we should, replied he with emotion.
And if I dare say all I wish, it would still be less than I feel. Dunbar
assures me you are still at liberty to consult only your own
inclinations, and let me hope I am not entirely the dupe of my own
vanity, in believing that I might yet conquer your indifference. Since
the hour when we first met, I had eyes for no one but yourself. Even
when we could not converse I have watched you with ceaseless
interest, and am forever thinking of you in absence, counting the
hours of my existence only by those passed in your society. Why,
then, do you so obviously avoid me? Why am I for ever made the
companion of Miss Smythe or Miss Anybody-else? You know and see
that my whole object in life is, to remain beside yourself. Every look,
word, and action tells you as plainly as language can speak, that I
love you to distraction, that my attachment has not been hastily
formed, to be as hastily laid aside, and now my only apprehension
is, that by too openly disclosing my feelings the confession may
separate us for ever, yet it can no longer be delayed, for I must
know at once now, whether I am to be happy or miserable for life?
Patrick has done very wrong, faltered Marion, while tears sprang
into her eyes, I told him long ago to let you know all. It is most
unfortunate that your preference should be given to one of the very
few who never can return it. You ask for a heart which is not mine to
give. My engagement to Mr. Granville cannot be soon fulfilled, but
while we both live, we shall live only for each other.
That, Dunbar assures me, can never take place, replied Captain De
Crespigny, while a dark red flush passed over his countenance; and
till it does, I cannot cease to hope. Nothing is more annoying, I
know, than the perseverance of an unrequited attachment, but I
must cling to the faint and haggard hope which remains. A mere
taper is extinguished by being blown upon, but a fire burns only the
brighter. The greatest felicity of life would not be good enough for
you, nor so much as I wish you, provided only we share it together;
but with another, I cannot wish you happiness. No! the words would
choke me. May you never find any till you find it with me. If you can
ever feel one relenting thought in my favor,—if, dissatisfied with
another, you think with even momentary regret of me, then, were I
at the extremity of the earth, let me but know it, and you shall find
that I have been true as the dial to the sun, even though not
brightened by its light.
Captain De Crespigny continued with vehemence of tone and
manner which nothing could interrupt, while Marion's countenance
became more and more expressive of grief and confusion.
If I have been to others the reckless, inconstant, and unprincipled
being you think, all who ever suffered a pang on my account are
now revenged. I never really loved any one but you! All else was
fancy—vanity—any thing but love. Were others like you, there could
be no changeableness or caprice, but never have I seen before, and
never shall I see again, so much to attract affection and to secure
constancy. Hereafter a solitary recollection of the hours spent with
you will be my only remaining happiness. Happiness!! there is no
such word for me, now! You, who delight in making all others happy,
would condemn me to misery! The thought of my defeated hopes
will forever ring upon my heart. The remembrance, that when I
asked that of you, which I never asked before, you coldly and
indifferently rejected me.
Not indifferently, but with heartfelt gratitude for your disinterested
preference, answered Marion, in a low, agitated voice. If already
married to another, I could not be more decided in saying, that you
must never renew the subject again, for I owe it to you, as much as
to myself and Richard, to say that my answer is final,—that we never
can be more to each other than friends, but that I sincerely hope the
time may come, when we shall meet as we did formerly, without
emotion, but with kind and cousinly regard.
Never! oh never! The very thought shows you have never loved as I
do! I could not be in the same room with you,—no! not in the same
kingdom. You may pity, if you cannot love me, replied Captain De
Crespigny, with a deep gasp of acute disappointment; and seizing his
hat, he rushed out of the house, nearly suffocated by contending
emotions; but as he ran, rather than walked, towards his lodgings,
the first and foremost of his thoughts was, under all circumstances,
and at all hazards, to persevere with unalterable pertinacity, and
only with his dying breath, to resign the hope of success.
CHAPTER XL.
Life is indeed a complicated and mysterious drama, in which Agnes
felt more and more dissatisfied with the part she had to play.
Harrowgate had been the threatre of many interesting scenes to
her; but now Lord Doncaster had departed with a vaguely-expressed
hope of her visiting him at Kilmarnock Abbey; and when Sir Arthur
felt sufficiently recovered to begin his long-desired progress towards
home, she slowly and sadly prepared to accompany him.
Before they reached Portobello, winter had already covered the earth
in a shroud of snow and of ice; the birds no longer carolled gladly on
the boughs; the rustling leaves had ceased to fall; the naked trees
hung their dejected branches, in bare and stern desolation, and the
blood-red sun glittered on the cold and barren fields. Winter's
dumb. All life and joyfulness had departed from the face of nature,
which looked, as Agnes remarked, like a wedding-cake without the
ornaments; and amidst weeks of dreary discontent, she compared
the death-like contrast of nature now, from what it had been, to her
own sadly altered feelings. She appeared constantly now to be in a
state of restless, almost feverish excitement, always, evidently,
expecting some event which never happened, while she became
daily more depressed and irritable.
Marion, in the mean time, during many a long and dreary evening,
resolutely buried beneath a smiling aspect, her own anxiety
respecting Mr. Granville's unaccountable silence, and devoted herself
as entirely to Sir Arthur's comfort, as if there had not existed another
being upon the earth; yet still, every knock at the door made her
heart palpitate with hope, and every note brought into the room,
caused her a new pang of disappointment and surprise.
If a grain of hope or joy were to be found in any circumstances,
Marion's was a mind to sift out and enjoy it; and her buoyant spirit
now shielded her from a too sensitive apprehensiveness, while she
repelled the withering fears that might have forced themselves on a
heart less candid and trusting. Her whole spirit rebelled against a
vagrant thought of Richard Granville's inconstancy or indifference;
though in Sir Patrick's letters from the continent, there was much
that might have insinuated distrust into her thoughts; but Marion
clung to the unswerving belief of her lover's infallible truth. She
knew that the stamp of Christian excellence was on his whole
character, engrained in his very being, and only to decay with life
itself; therefore her opinion was not at the mercy of any idle
representations; but the blast which might have uprooted a
superficial attachment, only deepened the root of her own, which
nothing could undermine.
Mr. Granville, in the mean time, having long ceased to hope for any
answer to his letters, became more and more impatient for the time
when he might seek a personal interview with Marion, of whose
constancy not a doubt ever crossed his imagination; while day after
day he watched with saddening apprehension over the declining
health of his sister, whose failing strength required all the
affectionate attentions he lavished on her, especially when, after a
few weeks, Sir Patrick also arrived at Florence, and Clara shrunk with
blighting, heart-broken grief, from every engagement that might
endanger her meeting him. She mournfully acknowledged, that
having at first esteemed as well as loved him, she was still unable to
conquer her misplaced affection; and that while nothing could
induce her to unite her fate to Sir Patrick's, or to place her happiness
in his care, still the painful consciousness that he was unworthy and
dishonored, weighed the more deeply upon her spirit, and crushed
her whole heart with anguish.
The constancy with which Sir Patrick tried to regain her affection
was deeply touching to Clara's young mind; and in vain she tried to
blot out his name with her tears. Still, Mr. Granville, with
inextinguishable hope, continued to believe that the germ of life
must be stronger than it seemed; but day after day she faded and
drooped. Change of air had done less than nothing for Clara's feeble
frame and wasted strength; while she spoke often, with a smile of
affectionate interest, respecting her brother's future life, though he
observed with emotion, that her own name was never included, and
that only when talking of a world hereafter, did she speak now of
their being together.
We must die to be perfectly happy, observed Clara, one day, in a
tone of calm and elevated peace. My sun has set in the morning,
Richard; and it might have seemed hard thus early to leave such a
world, so beautiful, so fragrant, so joyous, and embellished by such
affection as yours; but we know that sin has destroyed this whole
magnificent creation; that misery, decay, and death, are hid beneath
all. It is the glorious discovery of Christianity that we are immortal;
that we are created, not for time, but for eternity! So long as my
spirit continues to lodge in this most fragile of human bodies, I must
have sorrow and suffering to prepare me for throwing off the homely
garb of an earthly nature, and assuming the glorious garments of
heaven.
Mr. Granville covered his face with his hands, unable for some
moments to reply, while Clara continued, in a tone of solemn
sadness and fervent emotion—
The near approach of death fills my heart with strange and
wonderful thoughts! When, like the lightning from the cloud, my soul
departs from the body, O then, Richard, how I shall learn to know
the value of our immortal salvation! It bewilders me now to think,
that I myself shall survive that glorious sun, the solid earth, and all
the wonders around us; that I shall see and understand all the
miracles of creation; that I shall know and love all the wisest and
best of human beings who ever existed on the earth; and that I shall
then be wiser than the wisest, as well as happier than the happiest
of mortals. Richard! that is marvellous! and were it not for leaving
you, I could rejoice with a joy that is unspeakable, and full of glory.
Mr. Granville clasped Clara's emaciated hand in his own, and would
have spoken, but his voice failed; and after an ineffectual effort,
fearful of agitating his sister, he turned away and was silent; but she
saw his unutterable grief, and continued,
You could have borne this better if it had been yourself, Richard;
but I leave you in the hands, not only of an atoning Saviour, but also
of a sympathising friend, who will send you comfort according to
your utmost need; and, my dear brother, let us now remember, that
as the infidel La Harpe said, there is one text in Scripture sufficient
either to live or to die on, 'God so loved the world, as to give his only
Son, that whosoever believeth on Him should not perish, but have
everlasting life.'
Mr. Granville solemnly bent his head in token of acquiescence, and
closed his eyes, but large tears, notwithstanding every effort,
coursed each other down his face, and he avoided looking round,
while Clara in tremulous accents continued—
Before long I shall live only in your memory, and well do I know the
place you will give me there; but remember, dear Richard, when my
mortal frame is dissolved, that you will have another relative then
awaiting you in heaven, and that I shall yet be in as active a state of
consciousness there as here. When we are separated, you must still
sometimes revive old times, by reading with Marion the books I have
loved—by listening to the music I have delighted in—by walking in
my accustomed haunts at home—by rearing my favorite flowers—
and most of all, console yourself, my dear brother, by reflecting, that
when you and Marion are both worshiping God together on earth, I
shall also be adoring Him in heaven:—
'Tis sweet, as year by year we lose
Friends out of sight, in faith to muse
How grows in Paradise our store.'
The wintry year rolled on till Christmas eve, when Agnes, with a
discontented yawn, loudly wished that she had been born in the
planet Jupiter, where there was no winter at all. That night she
announced after tea to Sir Arthur, that she was about to leave home
for several weeks next day, being engaged to spend some time with
her friend, Mrs. O'Donoghoe. A considerable air of trepidation
appeared in her voice and manner when she spoke; and Marion,
having recently observed that her sister's thoughts were continually
pre-occupied, felt startled and amazed at the look of agitated
determination with which she intimated her approaching departure,
after which she hurried towards the door, anxious apparently to
avoid all discussion; but Sir Arthur, in a tone of mild authority, called
her back, and drawing in his breath between his compressed lips
with evident vexation, he assumed an air of grave but ironical
humor.
May I take the liberty of inquiring, Agnes, whether you have fully
investigated all the stories we heard at Harrowgate respecting Mrs.
O'Donoghoe's former connection with Lord Doncaster, and what she
actually is, before I consent, on very short notice, to entrust her with
my niece.
Oh! she is everything on earth most delightful! You need not have a
minute's anxiety about me, uncle Arthur! I can take excellent care of
myself. Nobody knows my own value better than I do!
Convince me of that, Agnes, if possible; but you are aware that my
whole heart abhors your recent very unaccountable intimacy with
that contemptible old roue, who shall be nameless, replied Sir
Arthur, with strong, deliberate emphasis. Any continuance of that
exceedingly familiar intercourse would be utterly improper; and as
for a young girl of your appearance setting out on a wild ramble with
any Irish adventuress recommended by Lord Doncaster, let me hear
of her having some very different introduction, or I cannot allow you
to go.
My dear uncle! I would dig my own grave and bury myself, if
anything prevented me! As for your permission, exclaimed Agnes,
her whole face illuminated with angry eagerness, I shall certainly be
most happy to have it; but if people strain the cord too tight, it
sometimes snaps altogether. I have made myself a positive promise
never to decline a good offer, and go I must. Mrs. O'Donoghoe is to
take me in her own carriage, free, gratis, and for nothing. Only think
how very kind!
My dear Agnes, replied Sir Arthur, while his brow darkened with
mournful anxiety, I cannot wonder if you tire of the dull,
monotonous house I have to offer you. A perfect mausoleum indeed!
It is a premature old age for girls like you and Marion to be, evening
after evening, the companions of a solitary old man. Often, of late,
have I considered in vain how it could be remedied. Yet, my dear
girl, there might be a solitude far worse, if you lose the respect of
others, and the peace of mind you may enjoy with me. Hearing what
I have lately done of Mrs. O'Donoghoe, and knowing all I do of Lord
Doncaster and the Abbe Mordaunt, I must lay my positive prohibition
on your accompanying them now. You may think me a whimsical old
man; but, Agnes, you cannot long be troubled with my care. Loaded
as I am with the weight of years and infirmities, my life is like a
spark on the ocean. Its fleeting joys and troubled thoughts are
drawing rapidly to a close; but if these were the last words I am ever
to speak, you must not go unprotected into such society.
The Admiral walked with slow and musing steps up and down the
room, his fine countenance flushed with agitation, and his eyes
shaded by his long white hair, exhibiting an expression of mournful
solicitude. Marion's heart swelled with agitation, while inwardly
moralizing on the officiousness of Irish widows, and Agnes bit her
beautiful lip with a look of resolute determination, flashing glances of
angry surprise at her uncle, and pouting her beautiful lip, though the
reverence which Sir Arthur never failed to inspire kept her silent.
Tell me, Agnes, continued he, stopping at length before her, with a
look of benignant kindness, is there anything within the compass of
my powers that could be done to make up for this disappointment?
We who are old must not forget that there are pleasures for the
young which they naturally wish to enjoy. If there be any place you
wish particularly to see——
It is not places, but people, that I care for! interrupted Agnes,
peevishly. With respect to this excursion, it is impossible for me to
get off. I shall go deranged if you interfere with it! The party is made
on purpose for me, the horses are bespoken, my things all sent to
Mrs. O'Donoghoe's, and nothing left for me but to bid you good-
bye!
This is little short of an elopement, Agnes! replied Sir Arthur, with a
mild but resolute countenance, while there was a tone of strong
resentment in his voice. What good object can there be in a scheme
so clandestinely begun! But I have no legal authority to detain you,
if affection and kindness are insufficient!—One thing only let me say,
painful as it is to my feelings, added the Admiral, while his whole
frame shook with emotion, and he walked several times across the
room. In the name of your father, Agnes, I forbid you to leave my
roof with the party you speak of; and if, in defiance of all propriety,
you do go, then—I would have said, never return here again; but
no!—I cannot say that to my brother's child. No!—till my home is in
the grave, you may share it with me. Come back when you will,
Agnes, and if I am alive, you shall be welcomed.
Marion caught the hand of Sir Arthur in her own, and kissed it with
ardent affection, while she felt a tightening in her throat, and a mist
before her eyes, till tears fell fast and thick, like rain, upon her
cheek; but Agnes, with whom kindness, in its most impressive form,
could excite no generous impulse, rose in silence, and hurried out of
the room.
That night, after Marion had been asleep for several hours, she
suddenly started up in bed, with that bewildered feeling of perplexity
experienced by those who are unexpectedly aroused at an unusual
hour. It was four o'clock in the morning, and a pale, cold, livid moon-
beam streamed faintly into the room, giving a chilled and spectral
aspect to all around. A death-like stillness reigned beside her, and
unable to account for having been so suddenly disturbed, she was
about once more to consign herself to repose, when she heard the
noise, repeated which she had begun to fancy must have been only
a dream. She listened in trembling astonishment, for it seemed as if
in her uncle's room over-head, some persons were trampling up and
down the room, drawers opening and shutting, heavy weights falling
on the floor, and a sound sometimes reached her, as if several
carpenters were at work.
Finding there was no mistake, Marion sprung out of bed, threw on
her dressing-gown, rushed up stairs, and having hastily thrown open
the door, she stood there transfixed for a moment with amazement
and fear. Through the glimmering dawn of light, she saw that Sir
Arthur was up, and completely dressed, while he appeared to be
hurriedly groping about the room, as if packing up for a journey. He
seemed unconscious of Marion's entrance, who stood for several
minutes watching him in speechless perplexity and consternation,
while her very blood forgot to flow, when she saw the stony look of
his eyes. His countenance was of an ashy paleness, his long grey
hair matted over his forehead, his expression sad beyond mortality,
and when she took his hand in her own, it felt cold and damp. His
eyes wandered over her face for a moment, without any apparent
recognition, and then giving a smile of utter vacancy, he resumed his
occupation with restless eagerness.
Uncle Arthur! dear uncle Arthur! what are you doing? exclaimed
Marion, throwing her arms round him, while her limbs were faint,
and trembled with fear. Speak, dear uncle! Speak to your own
Marion! Why do you not speak?
A deep silence ensued. Sir Arthur evidently did not hear her. His
cold, livid lips moved as if he would have spoken, but not a sound
became audible, and with the same vacant smile as before, he
turned away. The terror-stricken Marion now felt utterly appalled. A
death-like sickness came over her, horror and darkness seemed
gathering over her mind, and apprehensive lest her senses might
entirely fail, she hastily and vehemently rang the bell, calling loudly
for assistance.
Marion's was an intellect of that high tone which rises to meet a
great emergency, and though nearly paralyzed by grief and terror,
when she first saw the fearful, ghastly smile, with which her uncle
gazed around him, she now endeavored, by gentle persuasion, to
make him lie down in his bed, and tried, by speaking in accents of
tenderness, to recall his recollection, while impatiently longing for
Martin to appear; and during the few minutes that elapsed till he
entered, it seemed as if time itself had ceased to move.
The doctor was at length summoned, and having pronounced the
Admiral's illness to be caused by an oppression of the brain,
threatening apoplexy, he attempted to bleed his patient, though
almost without success; for Marion observed, while she held him in
her arms, that the blood scarcely flowed, till after some time he
uttered a fearful, convulsive cry, which rang through the room, and
fell back in a violent spasm, the immediate precursor of apoplexy.
Awe-struck and paralyzed with grief, Marion clung to her uncle, and
remained by his side, watching with deep and solemn affection every
turn of his features; while her cheek assumed the hue of death, her
tearless eyes were motionless, her quivering lips compressed, and
she remained as silent and immoveable as if the mortal shaft had
reached herself. Without shedding a tear or breathing a sigh, she
bent over the distorted countenance of Sir Arthur, and assisted in
cutting off the long white locks of his hair, which she had often loved
to look upon, but which were now strewed all unheeded on the bed,
and again seating herself by his side, she riveted his hand in her
own, becoming white and motionless as an image of marble.
Notice had been sent to Agnes' room of the afflicting event which
had taken place, and Marion expected every instant that her sister
would appear; but time passed on, and she came not, being one
who systematically avoided any scenes of distress, therefore she
satisfied herself with sending frequent messages of inquiry to the
door. At length, after some hours, Sir Arthur appeared to have
recovered his recollection; for he looked at Marion with a feeble
smile of deep affection, and laid his hand on her head as if to bless
her; but words were denied him; he struggled in vain to speak; and
she who had not yet found the solace of a tear, now bursting into an
irresistible agony of weeping, sobbed aloud. After gazing long and
tenderly in her face, Sir Arthur's eye-lids at length closed with
fatigue, and still clasping her hand in his, he fell into a peaceful,
quiet slumber of many hours' duration.
Those who have most leisure to contemplate death, generally think
least about it, and no one had ever meditated less on the subject
than Agnes. She occasionally remarked, when the infirmities of the
old and the indigent were forced upon her notice, that they might
hope soon to be released, and that to them it must, of course, be a
happy escape. The busy and active, she thought, had scarcely time
to die; and, for herself, she considered death as a very unpleasant
subject, which fifty years hence must be attended to, when the joys
and the dreams of her present life had vanished; but it seemed to
her most preposterous now, to lower her spirits by melancholy
reflections on what could not certainly be avoided, and would come
only too soon in the end. In short, her whole plan of life was, To-
day to sparkle, and to-morrow die.
Marion had stolen away to complete her midnight toilette, before she
settled for the day beside Sir Arthur's pillow, when she was amazed
near the door to meet Agnes, hurrying past in travelling costume,
and anxious, apparently, to avoid being seen, though, when an
interview became inevitable, she tried to carry it off with careless
audacity, being evidently in a perfect delirium of high spirits, which
she vainly tried to conceal.
Well, Marion! I am quite relieved to hear from Martin that there is
not the slightest danger! The doctors also say that everything has
taken a favorable turn, though, as for their opinion, I have despised
all physicians from Esculapius down to the magnesia-and-rhubarb
doctors of the present day. They all tell us the same thing of an
invalid, 'If he does not die, he will certainly recover!'
Marion listened with a look of grave and melancholy surprise; while
Agnes, trying not to seem aware of it, and evidently anxious to avoid
any reply, fixed her eyes on the door, as if impatient to proceed, and
continued, in rapid accents of assumed bravado—
You are looking really ill, Marion, and must have got a dreadful
fright! It would have killed me altogether! But make your mind easy,
for these attacks are, I am told, very common. The Duke of
Middlesex had ten or twelve, and people live often for years after
the first, which is a great comfort.
They do sometimes, but not always, replied Marion, with mournful
gravity. My dear Agnes, do not be too sanguine. This is a very
serious attack. You may hope, but I cannot; for it seems to me that
our uncle is laid on a bed from which he will never rise again.
Oh! you are nervous, after being so frightfully alarmed this
morning. It must have been very shocking, said Agnes, shaking her
well-arranged ringlets, and attempting to get up a melancholy look;
but in her mind there never was any of that gentle, feminine
apprehensiveness for others, which is so amiable and so endearing.
I feel quite confident that in a few days he will recover; but for the
present, Marion, you see everything through a darkened glass. I
have no fears whatever, added she, in a tone of superior wisdom.
Old people always remind me of a creaking door, forever
complaining, but never any worse! It is lucky for those who have
nerves to endure it all. I have none; therefore being of no earthly
use here, I should be quite in the way. Indeed, a single week of
moping at home, with fright and anxiety, would lay me up also.
You are not going, Agnes? Impossible! Listen to me for five
minutes.
I am not equal to the exertion! What can I do? It is out of the
question to break off my engagement now! I am really between the
horns of a dilemma, and must be tossed upon one or other of them.
Both Mrs. O'Donoghoe and Lord Doncaster have set their hearts
upon having me; and, as the schoolboys say in their speeches, 'It
must be so! Agnes, thou reason'st well!'
If we are sisters, hear me, replied Marion, in accents of breathless
indignation. Agnes! you cannot, you must not think of going.
But, as the lover says in the Critic, 'I can, I must, I will, I ought, I
do!' Marion, you do not know the importance I attach to my
excursion, which will last only a few days. As for this absurd affair of
Sir Arthur's, you think every breeze a hurricane; but it is well over
now, and, since he is ordered quietness, he will miss me the less, or
perhaps not at all, if you never mention my absence. Certainly my
forte is not in a sick-room, and yours is. My chief fault, as an
attendant on sick people, is, that I am good for nothing. As for
danger, Marion, I do not see any.
Or, rather, you will not see any. Agnes, I would not for ten thousand
worlds leave him now. Our best—almost our only friend, and
probably dying, exclaimed Marion, while hot, scalding tears rushed
in torrents from her eyes. The question now is not, whether Sir
Arthur will be restored as he was to us? but only, how many days or
hours he can be kept from the grave. Every passing moment is a
knell of death to my heart, when I think how few more we shall see
before he is gone forever. If you consider nothing but mere
appearances, Agnes, you ought to stay.
As for appearances, replied she, clasping her bracelet, I am of
opinion with the Abbe Mordaunt on that point, as on most others,
that those who study appearances have seldom any realities to
boast of.
Such sentiments might be expected from such a man, but I should
not certainly have supposed you would act upon them, especially
now. Believe me, Agnes, your own heart will reproach you forever
after. The danger is immediate and very great, said Marion, while
her tears fell drop by drop on the ground. My uncle is hovering over
the very brink of the grave, therefore, for my sake, and for his sake,
do not leave us.
But for my own sake I must! You have a teazing, exaggerated way
of stating things; but pray, remember now, Marion, the maxim
Madame D'Ambert taught us at school, 'Pour porter legerement la
vie, il faut glisser sur bien des choses!' I always prefer hopes to
fears, and hate that desolate, dreary look of yours, this morning.
You wish to rule and direct everybody, but I will not be governed or
trampled on, said Agnes, in an angry imperious tone. I did not
suppose as much could be said on any subject in the world as you
have said upon this. One would think, from your way of talking, that
Sir Arthur was nobody's uncle but yours; or that I did not know how
to act for myself! Well! I hope, for my own especial happiness, very
soon to be independent of those who never have appreciated me.
At all events, we have loved you, Agnes.
Yes! of course. Ah! here is the carriage! Good bye, then! Sir Arthur
will never miss me while you remain; but write often, though where
in the wide world to direct your letters is more than I remember;
but, Marion, we see in the Times newspaper every day,
advertisements entreating persons who have left their homes to
return, that all their wishes may be granted, therefore, when you
and Sir Arthur want me back, pray insert something of that kind.
Good bye!
With heightened color, and eyes fixed on the ground, Marion
received the hand of Agnes, and gave her one parting look of
expostulation, hoping to the last that nature and feeling might yet
make themselves heard; but when Agnes had sprung into Mrs.
O'Donoghoe's carriage, and kissed her hand with a parting smile,
every trace of agitation vanished from the face of Marion, but a band
of iron seemed around her head and her heart, as she slowly turned
away, disgusted and astonished at her sister's heartless levity, and in
the privacy of her own room, she sank upon her knees and offered
up solemn, fervent prayers for the many to whom she was attached,
but, above all, for her much-loved uncle.
CHAPTER XLI.
With all the acute susceptibilities of youth, Marion now experienced,
for the first time, what it was to watch over an almost hopeless
illness, and, with a shuddering sensation of unutterable woe, she
tried to obtain that comfort from above, which nothing on earth
could supply. Days passed slowly on, the longest and most
melancholy she had ever known, while most of her hours were spent
in prayer, but all around was gloom. Nothing could be more
oppressive to her than the subdued whisper and stealthy step of Sir
Arthur's attendants, his vacant seat, his darkened room, the mute
and solemn looks of his physician, and, above all, the inward
anguish with which, hour after hour, she sat with his hand in hers,
watching the fluctuations of his feeble pulse, observing with awe and
grief the pale ensigns of death gathering over his features, and
feeling as if every labored breath he drew gave him but a
momentary reprieve from the grave, while she could not bear to
contemplate the probability of burying with her beloved uncle, all the
dear and tender ties that bound them to each other.
With no one to console her, and nothing on earth to screen her from
the desolating blast of grief, the whole fabric of her worldly
happiness seemed crumbling to dust. Her heart was like an
exhausted receiver, and her spirit sank, yet no inducement could
have withdrawn her for an hour from that scene of solemn, deep,
and awful melancholy. Throughout the long, dreary hours of night,
each of which seemed an eternity of anxious care, Marion felt too
deeply impressed with the solemnity around for the indulgence of
any violent emotion. Nothing is so silent as intense feeling! Stunned
and stupified by the sudden affliction, a wild chaos of sorrow, fear,
and amazement rushed through her young mind, filling her with
agony, which tears could not relieve; but now was the time for that
supernatural aid given by Divine grace to the humble, believing
Christian. In silent, speechless prayer, Marion found her first and
only relief; then she felt that her heart was read, and her sorrows
pitied, by One who has shared every human grief, carried every
human sorrow, and to whom the suffering sinner never applies in
vain.
One morning, the grey light of dawn stole through a crevice of the
shutters, while, in her lonely silence, Marion felt as if the whole
world were in a trance, and not a sound was heard, but the slow
ticking of the clock, reminding her that time and death are forever
advancing. She sat watching every minute change of that beloved
countenance shattered by sickness, and evidently sinking in decay,
when Sir Arthur unexpectedly opened his eyes, which once more
beamed with intelligence, as he fixed them with a look of touching
mournfulness on Marion, and called her by name. That voice, which
had so long been dear to her, now sounded strange and unnatural,
being palsied by weakness, while the glassiness of the grave was in
his eye; but Marion, forcibly subduing all appearance of emotion,
stooped down, and, with a momentary gleam of hope, kissed his
pale forehead.
Marion! we have loved each other well, said he feebly, extending
his hand to her. For your sake I would stay, old and weary as I am,
but the far better will of God is otherwise. Before that clock strikes
again, I shall be in a better world.
Marion covered her face with her hands and attempted not to speak,
for she saw that the sure hand of time, and the heavier hand of
sorrow, had indeed done their work. It was but too evident that Sir
Arthur would never see another night, for he was about to awaken
in the mighty dawn of eternity, where no darkness ever would
follow. The frail, old, worn-out tenement of his body, so full of
infirmities, was now to enter its rest; his head, whitened with age
and suffering, had been anointed with peace, and, having partaken
with cheerful thankfulness of the banquet of life, he was evidently
willing to make way, that others might fill his place; not disgusted or
dissatisfied with existence, but thankful that he had tasted better
joys than those of earth, and desiring to enjoy them at last in never-
ending perfection. A mysterious conviction is generally given to the
dying, when their disease becomes mortal, but though nature shrank
at first from the solemn change, religion supported the powerful
mind of Sir Arthur, who added, in a tone of commanding calmness,
while a beam of ineffable peace overspread his countenance,
You are now my sole earthly care—as you are my only earthly
comfort. It breaks my heart to leave my Marion worse than alone,
while Patrick and Agnes remorsely pursue their own pleasure,
careless how you are trampled down in their wild career.
Dear uncle! whispered Marion, wishing to soothe him, you
consigned me to the care of Richard Granville, and year after year,
while we live, you shall be remembered by us both with the affection
and gratitude of children to a parent.
I did hope, my dear girl, that I should have lived to understand his
conduct, and even now, while standing in the gloomy porch of
death, it would cheer me to see him and dear Henry again. If
Granville be the man I believe him, he will come immediately to see
you now, and all will be satisfactorily explained—if not, the world is
worse than I thought.
If Richard is alive, he will come, dear uncle—but oh! what a
meeting it would be, without you!
Take comfort, dear Marion. Think of me often, but let it be with
consolation. My long life seems but a span! May yours be blessed
with every affection of this world—with every hope for eternity—and
may your death-bed be attended by one as dear and affectionate as
mine is. May your eyes be closed in the same undoubting faith, and
may I be permitted to meet you on the very threshold of heaven,
and in the august presence of Him, whom 'not having seen, we love,
and in whom believing, we rejoice with joy unspeakable and full of
glory.'
With a face livid as death, Marion choked back her sobs and
restrained her tears, while she listened to every faltering word Sir
Arthur said, as if her life depended on hearing him. When he
became silent from exhaustion, she attempted to whisper a few
broken expressions of grief and affection in his ear. Unable, however,
to think or speak under the weight of her sorrow, she might have
been mistaken for a corpse, but for the look of living agony in her
eye, while struggling with a sorrow which tears or lamentations
could not have expressed, and could not have relieved.
At length Sir Arthur's breathing became uncertain—his majestic
chest heaved convulsively—a damp, cold dew broke out on his
forehead—the heart which had beat with every kind and noble
emotion, could beat no more—and, giving a last glance of fond
affection at Marion, a grey, ashy hue stole over his features, and his
countenance assumed that strange, peculiar aspect which is seen in
death, and in death only. Marion saw it, and long afterwards that
look was forever before her sight. Nothing in all the earth is so
unutterly sublime as death. Strange and solemn was the mysterious
horror, the inexplicable wonder, with which Marion, for the first time,
witnessed the soul forsaking its earthly tabernacle. Day after day,
when she returned to watch beside all that now remained of her
earliest and kindest friend, while her heart seemed scorched and
seared with grief, she gazed on the mortal form in ruins before her—
its light extinguished—its tenant departed—its whole nature in a
moment transformed—and, forgetting sometimes for a moment her
own grief, her loneliness, her deep and fearful bereavements, she
thought but of that purified spirit now emancipated into the regions
of eternal glory, and almost longed for the period when she also
might become as indifferent to things of time as the inanimate
corpse beside her. Often, however, she tried, with an eye of faith, to
look beyond the portals of the tomb, remembering that death is to a
Christian, like the setting of the sun, for while lost to human sight,
he still exists and shines with unfading glory and everlasting
brightness.
When Sir Arthur's remains were placed in the coffin, Marion felt as if
the last link were severed between them. His better part had,
indeed, already departed, but the cold image before her was still
associated with all she had ever known of happiness or affection,
yet, in the strong agony of her grief, when all seemed a gloomy
chaos of solitary desolation, she felt consoled by reflecting that her
own devoted care had assisted in smoothing his passage to the
grave; and she could not but think how great must be the joys of
another world, when such affliction as her's was not worthy to be
compared with them. A wide horizon of sorrow seemed before her,
long days of loneliness and longer nights of grief; while, though
young in years, she already felt old in affliction, for a blight and a
mildew were upon her spirit. Marion's sanguine mind and ardent
feelings had nothing near her on which to rest, the whole energy of
her being, for the time, seemed crushed and withered; the future
appeared to stretch before her mind in a long vista of moving
shadows, and the memory of past happiness, like gold in the hand
of a drowning man, sank her only the deeper in grief. Her beloved
uncle seemed still to be everywhere—yet she saw him not. In all the
earth there was not a thought which did not pierce her, or a worldly
hope which did not now bring an icy chilliness to her heart—for a
dark cloud had fallen between her and all those whose affection
once adorned her existence.
It was now that Marion, like a tempest-tossed vessel, surrounded by
darkness and fear, turned for direction and help to that steady and
benignant light burning at a distance, which alone could direct her
into a haven of rest. Her sorrow became gradually illuminated by
hope and peace. She clung to every shattered wreck of happiness
which remained, and sinking on her knees, she felt that no one
could ever be completely alone, or completely miserable, who rightly
used the privilege of speaking her wishes in prayer to that great and
holy Being, who is the father and the friend of all his earth-born
children. Marion had long believed that the happiest life is that most
conformed to the will of God—that grief arises from not believing
whatever is appointed to be really best; and now she found in the
Bible that comfort which is nowhere else to be gained. The deepest
emotions of this world remain unseen and unknown to all around;
for the strength of character which gives power to feel, gives power
also to hide, and there is a modesty in real sensibility, which admits
not of display; but Marion, cut off now from all the tenderest
sympathies of life, became the more zealous and diligent in
preparing for that hour when mourned and mourner lie together in
repose.
Oh! if belov'd ones from their hallow'd sphere,
May witness warm affection's faithful tear,
At this deep hour, they hear the mourner's sigh,
And waft a blessing from their homes on high.
CHAPTER XLII.
At Florence, Clara Granville lingered and recovered, and lingered
again, sleeping little, eating nothing, and patiently trying every
remedy, though she herself was without hope of recovery, till at
length, decorated in all the radiant coloring and bright beauty of
consumption, she sank slowly but surely, evidently hastening to the
grave, though still Mr. Granville, with the tenacity of affection,
continued to hope, and still he told himself that she might, perhaps,
yet be spared. Day after day he sat beside her couch, reading,
conversing, and praying with her, while his brotherly attachment
seemed to grow only the more engrossing and considerate the
longer she needed his care; but it became evident to all around, that
his cares and hopes on her account were drawing to a close, and
that his sorrow must soon be without hope in a present world,
though full of hope in a world to come.
Letters now reached Mr. Granville, announcing that his long-pending
law-suit had been at length finally decided in his favor, giving him an
income more than equal to his utmost desires; but letters far more
deeply interesting to his feelings still were missing. Often and
anxiously had he watched for a single line from Marion, yet so well
had Sir Patrick arranged the measures which, as her guardian, he
persuaded himself it might be allowable to take, in order to intercept
her correspondence, that not a single letter ever escaped the
vigilance of his emissaries; and Mr. Granville, though he still
cherished, as his best earthly treasure, the belief of Marion's
attachment, felt so painfully perplexed respecting her, and so grieved
for Clara, that the almost unexpected change in his circumstances
appeared scarcely worth a thought, while a dense curtain of sorrow
seemed gathered around his spirits.
If the vital spark of his own existence had been about to expire,
Richard could scarcely have felt more deeply than now, beside the
dying bed of his young and lovely sister, who took his hand in her
own one day, while a fixed expression of tenderness and grief
appeared in her speaking eyes, and there was a melting softness in
her voice, when she said:
My only reluctance to die, is, dear Richard, because I must leave
you! This is sorrow; but our sorrow shall hereafter be turned into
joy. When patience has had her perfect work, you, like myself, have
a sure and certain hope of a better world, and, unlike me, you have
a hope also for this life, which contains the best blessing left to man
upon earth. Yes, Richard, you will soon have a loved and trusted
companion, suited in every respect to yourself; and with her, I trust,
you may enjoy a long course of usefulness and of joy, after I am no
more.
Mr. Granville kissed his sister's forehead with deep and solemn
affection, while his cheek became pale and his lip quivered; but his
heart was too full to reply, and Clara proceeded:
We have saved ourselves much unnecessary anxiety by placing a
firm and well-founded confidence in dear Marion. Let that remain
unshaken, Richard, till you meet, said Clara, fixing her large,
mournful eyes on him; and slowly closing them as she faintly added,
Tell Marion I died without a doubt of her constancy and truth. And
now, there is but one wish remaining to me in life, Richard—only
one——
Clara hesitated, the hectic color deepened on her transparent cheek,
her lip trembled, and she became silent, while Richard took her hand
in his own, and listened with affectionate anxiety for what was to
follow; but it came not. With a look of desolate grief Clara turned
away her head and was silent, while Mr. Granville, using every term
of affectionate endearment, entreated her not to let him suppose
there was a wish of her heart unspoken, or a desire which he could
grant unfulfilled. After a short struggle, during which he was alarmed
by the greatness of her emotion, she seemed at length to have
entirely conquered her feelings, and said in a perfectly calm,
unimpassioned voice—
A letter was conveyed to me last night—I know not how it came—
from Sir Patrick. He has been some time in Florence; he sends every
morning to inquire for me! I am told he even watches daily till the
doctors come out, and asks how I am!
True, dear Clara, and I feel for him deeply.
Richard! added she, raising herself up with sudden energy, and
clasping his arm, while her large, bright eyes became fixed on his, I
wish to see Sir Patrick once again! to have a last conversation with
him on this side of the eternal world. There is a sacred power in the
words of a dying friend, and I would summon the whole faculties of
my being, to bid him a last and solemn farewell. He has always
listened to me. If I have any influence, let me use it now. Think
what a blessed consciousness I yet might carry to the grave, if our
unhappy attachment were no longer a source of misery to both, but
of real and eternal advantage. Let me make a final effort of life and
of affection, to leave in his heart a thought of immortality. Such a
hope might almost hold back my spirit from the gates of death! Dear
Richard, I shall rise for half an hour to-morrow, and then let me see
him!
It would destroy you, Clara! you are quite unfit for the effort; but
give me a message. Say what you please; and, painful as it must be,
I shall see Sir Patrick, personally. We can sympathise with each other
now, as we never did before, and I shall deliver your very words.
You are unfit now, Clara, for any agitation.
Dear Richard! you never yet denied me anything! Do not now
refuse my last—my very last request. Whatever be the faults of Sir
Patrick, his attachment was disinterested and generous. I cannot die
in peace without saying that I am grateful—without, at least,
endeavoring to convince him, for his happiness now, as well as
hereafter, how true it is, that 'he sins against this life who slights the
next.'
It might be a work of usefulness and mercy, replied Mr. Granville,
in a musing tone; and if there be a pleasure in life you can yet
enjoy, dear Clara, I am not the person who could withhold it.
That I know. In this world which has so long been my home,
Richard, I have never lived a moment without being the happier for
your affection, and it will be so for ever. I am now counting the last
grains of my sand-glass as they fall, and ready to go alone through
the portals of the tomb. Every sorrow is about to be eternally
forgotten, every blessing to be eternally enjoyed. Most of my
feelings and affections are already transferred to another and a
better world; while I ought, as a dying Christian, to be like an eagle
soaring to the sky, and seeing nothing but the sun, yet, Richard, the
hope of serving one whom I loved only too well still lingers round my
heart, and will not be repulsed. Say then, Richard, that we may
meet;—tell him that, standing on the very brink of eternity, I feel as
if, even in another world, it would increase my felicity to know, if
permitted to look back on earthly scenes, that I had not left him
without hope or consolation.
I do not believe, Clara, that the invisible world is very distant; but
only that it is hid by the grossness of our mortal bodies; and I do
believe, my dear sister, that we may both, perhaps, yet see the
influence of your prayers and of your last words upon one whom I
most sincerely pity, said Mr. Granville, observing the mild, full,
melancholy eyes of his sister fixed upon him, while gradually, as he
spoke, her countenance became irradiated with peace. The ways of
Providence are indeed wonderful! If Dunbar be willing to forget all
that has ever been amiss between us both, I have forgotten it long
ago. If he choose it, we shall become friends, till Marion makes us
brothers.
Oh that I could live to see that day, and then close my eyes in
peace; but it must not be! In a few hours I shall have shed my last
tear, endured my last sorrow, and conquered my last enemy. Who
would not be willing, then, to change time for eternity, the sufferings
of earth for the joys of heaven, misery for happiness, and a dying
life for immortality!
A lovelier morning never had smiled on the glad earth, than that on
which Clara Granville received the visit of Sir Patrick alone. On a
couch near the window, into which the sun poured a flood of light
and warmth, propped up by cushions, Clara, with an unearthly
brightness glittering in her eye, and burning on her cheek, looked
more like a celestial spirit than a creature of earthly mould; but what
passed between them, during the long interview which ensued, no
one could tell. Clara's features, when it was about to close, betrayed
no agitation, but continued almost motionless for some time, while
the tone of her voice became slow and languid. Gradually her words
appeared fainter; her voice grew nearly inaudible; the color which
had tinged her cheek died away; and a death-like paleness
succeeded. Not a groan was heaved, nor a feature disturbed; but
scarcely had Sir Patrick time hastily to summon Mr. Granville, and to
support her in his arms, before her countenance became rigid as
marble, and her ethereal spirit had mysteriously fled from its mortal
dwelling.
Loveliest of lovely things are they,
On earth, that soonest pass away;
The rose, that lives its little hour,
Is prized beyond the sculptured flower.
Ev'n love, long tried, and cherish'd long,
Becomes more tender and more strong,
At thought of that insatiate grave,
From which its yearnings cannot save.
Sir Patrick's grief and horror now became almost delirious, and he
was tortured by a feeling of unutterable agony; yet still he seemed
resolute to doubt the fatal truth, to hope against hope, to believe
that by a miracle Clara might at length awaken from her seeming
repose; but her hand grew cold within his own, and the glassy
fixedness of her eye carried death to his heart. He felt and knew
that all was over, yet he could not allow himself to credit the solemn
event; till, at length, covering his face with his hands, he groaned
aloud in all the anguish of a sorrow without hope or resignation.
Mr. Granville, forgetful, apparently, of his own grief, tried now to
impart consolation from that rich fund of sublime peace and
everlasting hope which belongs, at such an hour, to the Christian;
for, though his own feelings were lacerated and torn with a sorrow
that seemed as sudden as if he had never till now expected it, still
there was a balm for his wounded spirit, which soothed the first
anguish of his sufferings, and would at last, he knew, bring him daily
more abundant consolation. No affliction seems to come so directly
from the hand of God as the death of those who have been so truly
loved; and in contemplating the wide gulf which now divided him
from Clara, the manly spirit of Mr. Granville was overpowered with
grief. This seemed a moment too awful for vehement sorrow. He had
watched the last struggle of existence in one with whom every
thought and emotion were hitherto shared, and now, while her
beloved and well-known features remained the same, all intercourse
and all sympathy between them had at once been closed; and, in
the hours of solemn contemplation which followed, Richard felt more
than ever a desire to learn what is seen and felt when the gloomy
curtain of life is withdrawn, and the glories of eternity are first
revealed; but, checking the speculations of a vain curiosity, he
opened the pages of holy inspiration, there to find an inexhaustible
fund of sublime and elevating comfort, convinced that, to have his
affliction sanctified, was even better than to have it removed.
The sympathy established between Sir Patrick and Mr. Granville now
brought them daily together, when the young Baronet learned, in
such society, to venerate and admire that holy faith, which as yet he
could neither feel nor comprehend; and every hour he became more
conscious of its happy effects on the mind and heart of Richard
Granville, who seemed always ready to forget every selfish thought,
when the glory of God or the good of others claimed his most
arduous and zealous devotion; and even his grief for Clara, deep and
agonizing as it was, found a vent in the most implicit attention to all
her wishes, and especially to her injunctions respecting the
restoration of his friendly intercourse with Sir Patrick.
The darts of anguish fix not where the seat
Of suff'ring hath been thoroughly fortified
By acquiescence in the will supreme,
For time and for eternity.
CHAPTER XLIII.
There is said to be a stage in sorrow, after which an addition can be
borne with apathy; but this the heart of Marion seemed never likely
to reach. It is a natural source of comfort, however, in mourning
over the loss of those we love, to find that they are appreciated and
lamented by others; and many kind letters of condolence on the
death of Sir Arthur reached the young mourner, from old
companions and young acquaintances. Some were written with
overdone and inflated expressions of sorrow, as if the writer had lost
a parent of her own; and if the occasion had been less
heartbreaking to herself, Marion might almost have smiled at their
tone of exaggerated grief. Others wrote studied compositions, so
beautifully got up, and with such skilfully turned periods, that the
writer must have felt certain of Marion's Life and Correspondence
being hereafter collected and published; while others concluded with
Yours, in haste, as an evident apology for neither head nor heart
being much enlisted on the occasion; but all were received with
grateful interest, being more or less a proof of kind intentions, very
soothing to the feelings of a solitary girl.
Each letter, as it came, caused her a palpitation of hope, followed by
a pang of disappointment; for every morning she arose with a
confident hope that now Richard Granville must certainly write, and
every evening closed in with an added weight of discouragement
and sorrow; for now indeed the roses of life seemed all to have
faded, and the thorns only to remain.
As Shakspeare observes, every one can master a grief but he that
has it; and among the many well-meaning but commonplace
acquaintances who came to gossip over the sorrows of Marion, and
to ascertain exactly how much Sir Arthur had left, there was not one
to whom she could unveil her feelings. Each of her well-intentioned
visitors said a few words in praise of Sir Arthur, enough to convince
Marion that no one but herself could appreciate the hundredth part
of his inestimable worth—a sentence or two then followed of pious
reflection, obviously spoken with restraint, and picked up by rote
from some volume of religious meditations, and the whole was
generally concluded in a masterly manner, by repeating a few texts
of Scripture, strung together from a concordance.
There is a solemn dignity in real grief, beside which all commonplace
or trifling consolations fall powerless and cold; but strangers in
return for their contributions of sympathy and comfort, evidently
expected from Marion an ostentatious display of affection, and were
often not a little disappointed, at the pale, still, concentrated
calmness of the lonely girl, who, subdued beneath the weight of her
recent sorrow, received visitors only when she felt able to do so with
composure, speaking to them with gentle, melancholy kindness, and
evidently endeavoring to derive all the comfort she could from their
society; yet often in the solitude which followed, did she feel inclined
to agree with an author, who remarks, that la pitie n'est pas le plus
due a celui qui pleure dans la solitude.
Marion seemed to live in a dream, yet she gazed on the daylight and
the people moving about on their errands of pleasure or business, till
she felt that the whole was a sad reality. The common, every day
routine of life seemed strange and unnatural, amidst the agony of
her first sorrow, when the tomb had so recently closed over her
earliest friend. She felt as if nature herself should have suspended
her ordinary course, and as if the melancholy awe so impressed
upon her own heart should extend to everything animate or
inanimate around—as if the very sun itself should scarcely rise and
shine as heretofore; and nothing appeared to Marion so strange, as
that sameness visible in the outward world, contrasted with the
mighty revolution in all her own inward feelings. Marion tried to take
a lesson in cheerful resignation, from thinking sometimes of the
many created by the same Almighty Father, and yet suffering far
more than she had ever done; and her eye fell one day on a blind
beggar, seated near her window, shivering with cold, emaciated with
hunger, solitary and deserted, shut out from the light of day,
friendless, homeless, and desolate, with none to sympathize in his
sorrows, or to cheer him by their affection. Yet, thought Marion,
that miserable being finds an object to live for, and would not
perhaps willingly die! God gives something to all his creatures; and
who makes me to differ from the most wretched. But bodily wants
are not the real sorrows of life! O no! The mind, when relieved from
such abject cares, has more leisure to grieve over withered hopes
and blighted affections; yet all trials, if rightly received, are but
blessings in disguise. It is well if, by tasting such sorrows as mine—
and they are many—I am taught to avoid the far greater and more
permanent evils of futurity. In this world, we are suspended over the
abyss of eternity, by a thread which grows more feeble every hour;
and all events should be welcome which are ordained by infinite
wisdom, to prepare me for that hour when my place on earth shall
be vacant, and my place in eternity—in a ceaseless eternity, shall be
filled.
Time has wings, even when they move most heavily, and as day
after day passed slowly onwards, Marion felt more and more
astonished to hear nothing of Agnes, who had written but once, a
very few days after her departure from home, in gay and almost
triumphant spirits, boasting of the excessive attention she met with
from all the party, of the splendor in which they travelled, of the
admiration she had herself excited, and of several magnificent
presents she had received from Lord Doncaster. In a postscript to
this letter, she expressed a careless, patronizing hope, that poor,
dear Sir Arthur was now convalescent; and as for anything but a
recovery, she seemed no more to doubt it than if death had been
altogether abolished. To Marion's surprise, when looking at the
signature of Agnes, a broad line had been drawn through the name
of Dunbar, and the whole was surrounded by a fantastic wreath of
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com

Building Soabased Composite Applications Using Netbeans Ide 6 Frank Jennings

  • 1.
    Building Soabased CompositeApplications Using Netbeans Ide 6 Frank Jennings download https://ebookbell.com/product/building-soabased-composite- applications-using-netbeans-ide-6-frank-jennings-1477684 Explore and download more ebooks at ebookbell.com
  • 2.
    Here are somerecommended products that we believe you will be interested in. You can click the link to download. Building Soabased Composite Applications Using Netbeans Ide 6 David Salter Frank Jennings https://ebookbell.com/product/building-soabased-composite- applications-using-netbeans-ide-6-david-salter-frank-jennings-4098274 Building The Agile Enterprise With Soa Bpm And Mpm Fred A Cummins Auth https://ebookbell.com/product/building-the-agile-enterprise-with-soa- bpm-and-mpm-fred-a-cummins-auth-4341514 Soa With Rest Principles Patterns Constraints For Building Enterprise Solutions With Rest Erl https://ebookbell.com/product/soa-with-rest-principles-patterns- constraints-for-building-enterprise-solutions-with-rest-erl-7108214 Building Spas With Django And Html Over The Wire Learn To Build Realtime Single Page Applications With Python 1st Edition Andros Fenollosa https://ebookbell.com/product/building-spas-with-django-and-html-over- the-wire-learn-to-build-realtime-single-page-applications-with- python-1st-edition-andros-fenollosa-44868684
  • 3.
    Building The SnowflakeData Cloud Monetizing And Democratizing Your Data Andrew Carruthers https://ebookbell.com/product/building-the-snowflake-data-cloud- monetizing-and-democratizing-your-data-andrew-carruthers-44888670 Building Web Applications With Vuejs Mvvm Patterns For Conventional And Singlepage Websites Ralph Steyer https://ebookbell.com/product/building-web-applications-with-vuejs- mvvm-patterns-for-conventional-and-singlepage-websites-ralph- steyer-44898498 Building Bridges Between Soft And Statistical Methodologies For Data Science Luis A Garcaescudero https://ebookbell.com/product/building-bridges-between-soft-and- statistical-methodologies-for-data-science-luis-a- garcaescudero-44905084 Building Microservices Designing Finegrained Systems 2nd Edition 2nd Release 2nd 20220708 Second Release Sam Newman https://ebookbell.com/product/building-microservices-designing- finegrained-systems-2nd-edition-2nd-release-2nd-20220708-second- release-sam-newman-45010590 Building Python Microservices With Fastapi Build Secure Scalable And Structured Python Microservices From Design Concepts To Infrastructure 1st Sherwin John C Tragura https://ebookbell.com/product/building-python-microservices-with- fastapi-build-secure-scalable-and-structured-python-microservices- from-design-concepts-to-infrastructure-1st-sherwin-john-c- tragura-45036900
  • 6.
    Building SOA-Based Composite ApplicationsUsing NetBeans IDE 6 Design, build, test, and debug service-oriented applications with ease using XML, BPEL, and Java web services David Salter Frank Jennings BIRMINGHAM - MUMBAI
  • 7.
    Building SOA-Based CompositeApplications Using NetBeans IDE 6 Copyright © 2008 Packt Publishing 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 embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: February 2008 Production Reference: 1010208 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847192-62-2 www.packtpub.com Cover Image by Nilesh R. Mohite (nilpreet2000@yahoo.co.in)
  • 8.
    Credits Authors David Salter Frank Jennings Reviewer MarioPérez Madueño Acquisition Editor Priyanka Baruah Development Editor Nikhil Bangera Technical Editor Bhupali Khule Editorial Team Leader Mithil Kulkarni Project Manager Abhijeet Deobhakta Indexers Hemangini Bari Monica Ajmera Proofreader Angie Butcher Production Coordinator Shantanu Zagade Cover Work Shantanu Zagade
  • 9.
    About the Authors DavidSalter is an enterprise software architect who has been developing software professionally since 1991. His relationship with Java goes right back to the beginning, using Java 1.0 for writing desktop applications and applets for interactive web sites. David has been developing Enterprise Java Applications using both the J2EE standards and open source solutions for the last five years. David runs the Java community web site Develop In Java (http://www.developinjava.com), a web site for all levels of Java developers. Foremost, I would like to thank my wife and family for putting up with my many hours at the computer whilst writing this book. Special thanks go to my wife for all her encouragement and support. I'd also like to say thank you to all the people at Packt Publishing, especially Priyanka, Abhijeet, Bhupali, and Patricia. Thanks also go to the NetBeans Enterprise Developer community, who have provided help and assistance throughout the writing of this book.
  • 10.
    Frank Jennings worksin the Information Products Group of Sun Microsystems Inc. He has more than 9 years of experience in Java, SOA and System Design. He is an Electronics Engineer from Madras University and has worked for several open source projects. Frank has written regular columns for leading Java journals including Java Developer's Journal and Linux Developer's Week. Frank is also the co-author of the book SOA Approach to Integration focusing on SOA design pattern for enterprises. Frank also is involved in the technical publication of Sun Microsystems in the fields of Solaris and Developer AMP Stack. His blog can be read at http://blogs.sun.com/phantom and he can be reached at theghost@sun.com. He also holds a Post Graduate Diploma in Computer Science and an Advance Diploma in Computer Integrated Management from University of Indianapolis. It is just amazing how the guys at Packt Publishing put up with me inspite of my late drafts. I would like to thank Abhijeet and Bhupali for all their hardwork in making me work to complete this book. I also thank the NetBeans Documentation team for providing an extensive set of tutorials on the SOA capabilities of NetBeans.
  • 11.
    About the Reviewer MarioPérez Madueño was born in 1975 in Turin and lives in Barcelona. He graduated in ETIS from the Open University of Catalonia (UOC) in 2006 and is currently finishing studies for the EI degree. He is a foundation member of ARUOC robotics group in the same University. Mario is a Java SE, ME and EE enthusiast and a fan of NetBeans IDE, he is currently contributing with the Spanish translation team for NetBeans 6. Acknowledgements goes for my wife María, for her unconditional help and support in all the projects I get involved, and to Martín for giving me the force for going ahead.
  • 12.
    Table of Contents Preface1 Chapter 1: Enterprise Application Development 7 SOA and POA 8 Introduction to Various BPEL Processes 10 Partner Services 11 Activities 12 Variables 12 Composite Applications and JBI 15 AirAlliance Company 17 The Problem 17 The Enterprise Stack 19 Summary 20 Chapter 2: Getting Started 21 Getting the Software 21 NetBeans IDE 6.0 22 OpenESB 22 Setting up the Environment 23 NetBeans Projects 25 Summary 26 Chapter 3: Service Engines 27 Need for Java Business Integration (JBI) 27 Enterprise Service Bus 29 The Normalized Message Router 30 Service Engine Life Cycle 31 Service Engines in NetBeans 33 BPEL Service Engine 35 Java EE Service Engine 38 Increased Performance 39
  • 13.
    Table of Contents [ii ] Transaction Support 39 Security Support 39 SQL Service Engine 39 IEP Service Engine 41 XSLT Service Engine 44 Summary 49 Chapter 4: Binding Components 51 Binding Components 51 NetBeans Support for Binding Components 52 File Binding Component 54 SMTP Binding Component 57 SOAP Binding Component 64 JDBC Binding Component 66 JMS Binding Component 68 Other Binding Components 70 Summary 71 Chapter 5: BPEL Designer 73 BPEL for Business Process 74 Understanding BPEL Projects 78 BPEL Views 79 Design View 80 Source View 81 BPEL Mapper 82 Palette 83 Web Service Activities 84 Invoke 84 Receive 86 Reply 87 Partner Link 88 Other BPEL Activities 90 Navigator Window 90 A Simple Example 91 BPEL 2.0 Elements 111 BPEL Products and Vendors 112 Summary 113 Chapter 6: WSDL Editor 115 What is WSDL? 115 Why WSDL? 116 The Format of WSDL Documents 117 WSDL Types 118 WSDL Messages 118
  • 14.
    Table of Contents [iii ] WSDL Port Types 119 WSDL Binding 120 WSDL Service 121 NetBeans Support for Creating WSDL Documents 121 NetBeans Support for Editing WSDL Documents 125 Refactoring of WSDL Entities 129 Building a Simple Contract First Web Service 130 Summary 140 Chapter 7: XML Schema Designer 141 What are XML Schemas? 142 NetBeans Support for XML Schema Documents 145 Source View 147 Schema View 148 Design View 150 Uses of Elements 153 XML Schema Design Patterns 154 Summary 157 Chapter 8: Intelligent Event Processor 159 Need for Event Processing Tools 160 IEP Service Engine 162 Continuous Query Language (CQL) 164 The IEP Editor and Palette 165 Validating Event Processors 171 Operators Input and Output Types 172 Testing IEP Projects 173 Summary 178 Chapter 9: Handling Events 179 Fault Handling Within WSDL Documents 180 BPEL Handlers 184 Fault Handlers 184 Event Handlers 192 Compensation Handlers 196 Termination Handlers 197 Summary 197 Chapter 10: Building a Sample Application 199 About the Sample Application 200 Getting Started 202 Creating Partner Services 203 Creating the BPEL Process 208 Creating a Composite Application 223
  • 15.
    Table of Contents [iv ] Part A - The Approach 224 Testing Part A Source 229 Part B – Using Multiple Partners 231 Testing Part B Source 239 Part C – Writing to File 240 Testing Part C Source 247 Part D – Sending JMS Messages 247 Testing Part D Source 251 Part E – Conditions and Sequence 252 Testing Part E Source 261 Part F – Sending Mails 262 Testing Part F Source 266 Part G – Event Processing 267 Summary 274 Chapter 11: Composite Applications 275 Role of Composite Applications 275 NetBeans Project Types 276 Workspace 277 Non-Hierarchical Model 279 CASA Editor 280 Summary 281 Index 283
  • 16.
    Preface Composite applications aidbusinesses by stitching together various componented business capabilities. In the current enterprise scenario, empowering business users to react quickly to the rapidly changing business environment is the top most priority. With the advent of composite applications the 'reuse' paradigm has moved from the technical aspect to the business aspect. You no longer re-use a service but re-use a business process. Now, enterprises can define their own behaviors optimized for their businesses through metadata and flows. This business process composition has become increasingly important for constructing business logic. The ability of composite applications to share components between them nullifies the distinction between actual applications. Business users should be able to move between the activities they need to do without any actual awareness that they are moving from one domain to another. The composite application design enables your company to combine multiple heterogeneous technologies into a single application, bringing key application capability within reach of your business user. Enterprises creating richer composite applications by leveraging existing interoperable components increase the development organization's ability to respond quickly and cost-effectively to emerging business requirements. While there are many vendors offering various graphical tools to create composite applications, this book will focus on OpenESB and NetBeans IDE for designing and building composite applications. This book introduces basic SOA concepts and shows how you can use NetBeans and OpenESB tools to design and deploy a composite application. After introducing the SOA concepts, you are introduced to various NetBeans Editors and aids that you need to understand and work with to design a composite application. The last part of the book deals with a full fledged incremental example on how you can build a complex composite application with necessary screen shots accompanied by the source code available on the website.
  • 17.
    Preface [ ] WhatThis Book Covers Chapter 1 introduces SOA and BPEL to the readers with simple examples and gives an overview of the JBI components and runtime required to build composite applications. This chapter also gives you an overview of the need for SOA-based applications in companies by depicting an example of an imaginary AirlinesAlliance system. Chapter 2 shows you how you can quickly setup NetBeans IDE and other runtime environments including OpenESB runtime and BPEL engine. There are many software/tools mentioned in this chapter that you need to download and configure to get started building composite applications using NetBeans. Chapter 3 provides an overview of Java Business Integration (JBI) and the Enterprise Service Bus (ESB). You will learn about JBI Service Engines and how they are supported within the NetBeans IDE. Chapter 4 introduces JBI Binding Components and how they provide protocol independent communication between JBI components. You will also learn about the support that the NetBeans IDE provides for Binding Components. Chapter 5 introduces the NetBeans BPEL Designer that comes bundled with the NetBeans IDE. You will also be introduced to the graphical tools/wizards and palettes available for creating BPEL files. Chapter 6 provides an overview of WSDL and how WSDL documents are formed. You will learn about the use of WSDL in enterprise applications and the WSDL editor within the NetBeans IDE Chapter 7 covers the XML schema designer and shows how it aids rapid development and testing of XML schema documents. Chapter 8 provides you an overview of the Intelligent Event Processor (IEP) module and the IEP Service Engine that can be acquired from the OpenESB software bundle. This chapter also shows the need for an event processing tool through simple composite application examples. Chapter 9 provides details of fault handling within a BPEL process and shows how these can be managed within the NetBeans IDE by using graphical tools. Chapter 10 shows you how you can build simple to complex composite applications and BPEL processes using the NetBeans IDE. The examples in this chapter are divided into several parts and the source code for all parts is available in the code bundle. Chapter 11 gives you the overall picture of the composite application and the need for a composite application to deploy your BPEL processes. The composite application support provided in NetBeans IDE comes with a visual editor for adding and configuring WSDL ports and JBI modules.
  • 18.
    Preface [ ] WhatYou Need for This Book Java SE 5 or higher OpenESB Components NetBeans 6 + OpenESB Addons Bundle Who is This Book for This book is for enterprise developers and architects interested in using NetBeans IDE and OpenESB tools to build their SOA-based applications. Conventions In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning. There are three styles for code. Code words in text are shown as follows: message sayHelloRequest has been defined A block of code will be set as follows: ?xml version=1.0 encoding=UTF-8? definitions name=HelloWSDL targetNamespace=http://j2ee.netbeans.org/wsdl/HelloWSDL xmlns=http://schemas.xmlsoap.org/wsdl/ When we wish to draw your attention to a particular part of a code block, the relevant lines or items will be made bold: message name=sayHelloReply part name=outputMessage type=xsd:string/ /message message name=sayHelloFault part name=faultMessage type=xsd:string/ /message New terms and important words are introduced in a bold-type font. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: From the New Project wizard, select SOA | BPEL Module. • • •
  • 19.
    Preface [ ] Importantnotes appear in a box like this. Tips and tricks appear like this. Reader Feedback Feedback from our readers is always welcome. Let us know what you think about this book, what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of. To send us general feedback, simply drop an email to feedback@packtpub.com, making sure to mention the book title in the subject of your message. If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email suggest@packtpub.com. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors. Customer Support Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase. Downloading the Example Code for the Book Visit http://www.packtpub.com/files/code/2622_Code.zip, and select this book from the list of titles to download any example code or extra resources for this book. The files available for download will then be displayed. The downloadable files contain instructions on how to use them.
  • 20.
    Preface [ ] Errata Althoughwe have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing this you can save other readers from frustration, and help to improve subsequent versions of this book. If you find any errata, report them by visiting http://www.packtpub. com/support, selecting your book, clicking on the Submit Errata link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to the list of existing errata. The existing errata can be viewed by selecting your title from http://www.packtpub.com/support. Questions You can contact us at questions@packtpub.com if you are having a problem with some aspect of the book, and we will do our best to address it.
  • 22.
    Enterprise Application Development Organizations arerapidly moving towards an information-driven business model that exerts a lot of pressure on the response time. Response time is the primary issue for organizations adopting new technologies. Any Business process model designed by an organization should be flexible, extensible, and reliable primarily to tackle the information burst experienced by most enterprises. The objective of this book is to help enterprise application architects and developers understand various Service Oriented Architecture (SOA) tools available as part of the NetBeans IDE thus, enabling them to build an enterprise grade, scalable application in a short period using a single development interface. In this chapter, we will be discussing the following topics: SOA concepts Introduction to various BPEL Processes Composite Applications and JBI AirAlliance—our sample application According to Gartner Inc., enterprises will eventually adopt SOA for their business critical processes, sooner or later. Although architects have been discussing and implementing SOA for the past several years, practicing SOA is still new, and generally requires the utmost care in application design when compared to other similar architectures. SOA always emphasizes on distributed architecture spanning multiple web services and applications that are part of a different heterogeneous category of applications. This in turn adds additional complexity to the whole system. If you do not carefully connect your various business applications through a set of well defined processes, it will lead to data chaos and breakdowns. • • • •
  • 23.
    Enterprise Application Development [ ] Not all SOA implementations you see today are tuned for maximum performance. In fact performance was always a key issue when considering SOA for business integration. When SOA principles are applied too rigidly, you can expect some run-time issues. Hence it is better not to go by any book or guidelines and instead, to adopt your own SOA-based system that is scalable and reliable for your needs. The primary factor that you need to understand is that SOA is a paradigm shift in doing business and requires a complete comprehension of the events, processes, and fault endpoints that occur in your enterprise. Developing enterprise applications is much more than just building a system that can process and share data between web services and various clients. Consider, for example, an airlines reservation web service that processes the guest itinerary. If a reservation cannot be made, it should have the capability of contacting a partner airline's web service and then process the itinerary. If the itinerary processing is successful, it should confirm the booking to the client. Now, there is more than one type of enterprise system involved. Which part of your enterprise system will orchestrate the transaction? Who will set the guidelines for fail-safe communication? There is a clear need for a middle man or a centralized web service to orchestrate these disparate web services to make the reservation process successful and fail- safe. BPEL (Business Process Execution Language) is widely accepted as an industry standard for orchestrating web services to perform meaningful business processes. This book focuses on using a particular BPEL implementation for solving business integration problems. This implementation is the BPEL Service Engine from the OpenESB project at https://open-esb.dev.java.net/. Project OpenESB implements an Enterprise Service Bus runtime using Java Business Integration (JBI) as the base. This allows easy integration of web services to create loosely coupled enterprise class composite applications. SOA and POA Today, most companies are considering SOA and web services as a viable business process model to address the integration needs for building a robust enterprise application. While SOA has become a model to implement and solve integration problems, many companies are still confused about implementing SOA as there appear to be a myriad of ways to implement an SOA-based model. Also there are companies that already have a time tested solution implemented and would like to move to the much extensible SOA model. SOA and POA based applications enable businesses by leveraging existing web services and by minimizing the cost of deploying new services.
  • 24.
    Chapter 1 [ ] The primary objective of designing an enterprise application is to glue together different services to suit a particular business need. However, there is a bigger challenge involved in designing this whole system wherein introducing new services or modifying existing services should not affect the system to a larger extent. This can only be achieved when you have a set of business processes that can orchestrate the system, making the services communicate with each other at the right time. Hence, orchestrating services through BPEL has become a much acclaimed solution for designing enterprise applications. BPEL is emerging as the clear standard for composing multiple synchronous and asynchronous services into collaborative and transactional process flows. Web Service Web Service Service Orchestration Point Client Web Service Well designed SOA-based applications reduce the cost and complexity of implementing business processes that cater to all the connected partners including customers, suppliers, and other clients. Prior to the SOA-based model, many businesses found this objective almost unattainable, because technical roadblocks made it difficult to offer a business process as a service that could be universally shared by its target community of users. The Web has demonstrated that universal access is not only possible but is now a fact of business life, and has proven that a combination of open protocols, tools, and infrastructure can create great value for the business community. The SOA extends this value to cover the creation and sharing of business processes, utilizing web protocols, tools, and infrastructure to meet this new objective. The challenge is to find the Service Orchestration Point for hosting the business processes that interact with heterogeneous services and provide a seamless and quick solution to the customers.
  • 25.
    Enterprise Application Development [10 ] Introduction to Various BPEL Processes A business process is the procedure that an organization uses to achieve a larger business goal. A business process is actually a series of individual tasks, and each task is executed in a specific order. Business Processes are synchronous or asynchronous, depending on the method you choose to invoke your business process. A synchronous business process can contain asynchronous operations, but they must be added after the starting event in the process flow. That is, at runtime the processes are executed after the synchronous starting event is complete. As an integral part of the NetBeans SOA tools, business processes provide the primary means through which enterprise services are integrated. NetBeans SOA tools features the BPEL Designer, which has been formulated so that architects can easily create complex composite applications involving web services without much programming effort. To this end, you can easily create and develop a business process in an intuitive graphical programming environment called the BPEL Designer and deploy it to a separate runtime environment for execution. This runtime is the OpenESB runtime that is integrated with the GlassFish application server. The BPEL Process starts with a receive activity, proceeds with invoking external services and finishes by replying back to the Client. A BPEL process typically interacts with one or more external Web Services (the BPEL process is also a web service). These external web services are called partner services.
  • 26.
    Chapter 1 [ 11] The above figure shows a preview of how a simple BPEL process can be designed using the NetBeans BPEL Designer. In the above example, there are two partner services, one is the BPEL client implementation and the other one is the web service EJB implementation which has one operation processItinerary. In order to understand the simple BPEL process, let us define some of the terms most commonly used while designing a BPEL process. Partner �������� Services Any external service or client that interacts with the BPEL process is called a partner service. A process starts and ends somewhere, and involves the interaction of at least one other outside partner. In the above example, the partner is the web service that has the ability to process the client's request. The customer sends the guest itinerary for processing. The BPEL process receives the itinerary, invokes a web service that processes the itinerary, and returns the itinerary back to the customer. This simple process helps us understand the BPEL activities that we will focus on later in this book.
  • 27.
    Enterprise Application Development [12 ] Refer to Chapter 10 to learn how partner services can be designed and created using NetBeans. Activities Activities are the individual business tasks within the process that compose the larger business goal. In the previous screenshot, activities represent each step in the process. Thus the most common activities are Receive, Invoke, Assign, and Reply. For more information on the BPEL activities supported in the BPEL Designer, refer to Chapter 5. Variables In the previous example, between the Receive and the Invoke activity, we are assigning the guest itinerary elements to a new variable. (Assigning Guest name, travel date, preferred class.) This is basically a copying process (creates an XPath expression in the BPEL file) and it can be done visually using the NetBeans BPEL Mapper (explained in Chapter 5). Variables store the data that are used by the business process. As we discussed earlier, the partner service interacts with the business process for the purpose of receiving a message in response to a request. Customer Enumerate the list of airlines Reservation Request Reservation Confirmation Pause Airlines The above figure depicts a typical asynchronous and synchronous business process. An asynchronous process is used when the BPEL process is long-running. The results are returned to the client by performing an invocation on the client. Thus the customer asks for reservation and disconnects. The business process processes the requests and gets back to the customer. It is more like a Leave a message and we will get back to you kind of setup. This pause does not happen with a synchronous business process, wherein the customer waits indefinitely to get the response. A classic example is the reservation process.
  • 28.
    Chapter 1 [ 13] However, there is a caveat here. The BPEL process is shared and is not a singleton. Many customers work with the same business process. There should be a way for the business process to identify its customers. Customer NA. Itinerary Number Provide Process Reservation Reservation Confirmation Send Itinerary Number Pause Airlines The above figure depicts an example wherein the customer sends a reservation request for a particular airlines' destination on a particular date. The business process, after communicating with the airlines' web service, finds out the reservation cannot be processed. Hence it updates the customer itinerary with an itinerary number that the customer can use later to send the reservation request. This is how a correlation is used by the business process, to distinguish the customer in their initial interaction so that they can recognize each other in the future. A correlation is the record that the business process uses to keep track of multiple partners in the same business process. NetBeans BPEL Designer lets you set correlations for Invoke activities through a visual interface as discussed later in this book. Note that the business process is able to manage multiple tasks, and does not hang in a single business process waiting for it to conclude at the expense of all other activities. Instead, while they are waiting for the itinerary number to arrive, the process conducts similar business, using the same business process with other customers. Since multiple clients can use the same business process, it is possible that each application implementation may desire slight variations of the same business process. Therefore, it is important that business processes have points-of-variability. Thus giving the user of the composite application the ability to configure the business process to their specific requirements.
  • 29.
    Enterprise Application Development [14 ] A Business process can also be abstract in the sense that the appropriate business logic to make decisions is defined, but the sensitive information needed to choose a course of action is hidden from the process partners. An abstract process is basically a description of a business process, and cannot be run on the server, unlike an executable business process. We will discuss these processes in the coming chapters. Consider the following guidelines for creating BPEL processes: Support multiple clients—your business process should be able to process multiple clients simultaneously. So make sure that you have correlations set on messages. Intelligent event processing—you need a real-time business event collection and processing mechanism to create an efficient process. Secure your business processes—we are talking about enterprise systems. You had better secure your business processes. This is quite easy using the Identity enabled web services support in NetBeans. Create re-usable partner services—make sure that partner services are reusable and can be used across different business processes. For example, the getItinerary operation of an airlines web service will be used by multiple business processes. Why do you need to consider BPEL for orchestration? In a complex business transaction, just developing web services and exposing their functionalities over WSDL is not enough. Sequence of execution and branching in case of failures and other events are critical to business transactions. Sequencing and conditional behavior are the strengths of BPEL. BPEL does the following for your business transactions: 1. Coordinates asynchronous communication between different web services. A client requests for a flight reservation and the BPEL process interacts with various partner services to process the reservation. 2. Manipulates data before exchanging between different services. The BPEL process can check, verify, and modify data from the client before sending requests to partner services. A classic example of data manipulation is an intelligent event processing mechanism. • • • •
  • 30.
    Chapter 1 [ 15] 3. Conditional and parallel processing is possible with BPEL services. If a reservation with one airline is not available, the BPEL process can send the reservation request to another partner airlines web service. 4. BPEL process can undo or compensate at any state in its life cycle. 5. Support long running business processes. Composite Applications and JBI A composite application is an accepted solution that addresses a specific business problem by bringing together business logic and data sources from multiple underlying systems. Typically a composite application will be associated with one or many business processes, and may bring together several process steps, presenting them to the client through a single interface that is customized to the requirements of the business need. SOA describes a category of composite applications composed of service provider and service consumer components that segregates business logic and offers location transparency for the service providers and consumers. The SOA approach lets you replace or upgrade individual components in the application without affecting other components or the process as a whole. Moreover, you can independently specify alternative paths through which the components in the application exchange messages. The next couple of chapters in this book provide concepts and constructs needed for building a composite application using the NetBeans SOA tools. Our example application that we will be creating in this book is finally deployed as a Java Business Integration (JBI) module in the JBI Runtime Environment provided by GlassFish application server. JBI runtime is integrated with Sun Java System Application Server and the open-source GlassFish application server. This is the same JBI runtime that was available as part of OpenESB project. OpenESB is also available as an add-on in the Java Application Platform SDK. The OpenJBI Components project on java.net is an incubator project started to foster community-based development of JBI components that conform to the Java Business Integration specification (JSR 208).
  • 31.
    Enterprise Application Development [16 ] JBI is integrated with Sun Java System Application Server as a pre-configured lifecycle module, which means that whenever the application server's instance starts up, the JBI runtime will be available. Client JBI Message Router HTTP/SOAP Binding Component Application Server Bridge Application Server 8 7 9 6 5 10 4 3 12 11 2 13 1 14 Java EE Service Engine BPEL Service Engine JBI Runtime Environment There is no user interaction required to configure or start the JBI runtime. It is just like any other service of the application server. Java EE Service Engine acts as the bridge between Java EE applications and JBI. A Java EE application archive (ear/war/jar) can be packaged in a JBI composite application and deployed as one single entity. Service units belonging to other JBI components and Java EE applications can share the same transaction and security contexts. JBI is built on a web services model, and provides a pluggable architecture for a container that hosts service producer and consumer components. Client and services connect to the container via binding components or can be hosted inside the container as part of a service engine.
  • 32.
    Chapter 1 [ 17] Java Business Integration (JBI) is a Java standard (JSR 208) for structuring business integration systems along SOA lines. It defines an environment for plug-in components that interact using a services model based directly on WSDL 2.0. Project OpenESB is an open-source implementation of JBI. It extends the JBI specification by creating an enterprise service bus (ESB) from multiple JBI instances. The instances are linked by a proxy-binding based on JMS. This allows components in separate JBI instances to inter-operate in the same fashion as local ones. JBI defines standard packaging for composite applications that are composed of service consumers and providers. Individual service units are deployable to components; groups of components are gathered together into a service assembly. The service assembly includes metadata for bonding the service units together, as well as bonding service units to external services. This provides a simple mechanism for performing composite application assembly using services. AirAlliance Company All that we have discussed so far is the general principles of SOA and BPEL based business processes. To make things a little easier, we will attempt to discuss various concepts covered in this book in the context of an imaginary airline called AirAlliance. The Problem AirAlliance is the largest airline with 64 partner airlines working across 124 countries. AirAlliance attempts to build an enterprise application wrapper on top of the 64 partner airlines web services so that travel reservation can be made across airlines from a single web interface. The challenge is to build BPEL processes that orchestrate different partner services to provide a seamless travel experience to the customers. The problem is how to build a global airline alliance enterprise system that offers customers worldwide reach and a smooth travel experience. For the customer querying on the flight status, baggage transfer, connection information and other itinerary related information is through a single interface that connects to the AirAlliance Web Service (BPEL Process). The itinerary processing and airlines querying happens transparently.
  • 33.
    Enterprise Application Development [18 ] Look at the following figure that depicts a simple business process: Guest Itinerary Process Itinerary Yes Yes No No NorthAir WS SA-Check Availability NA-Check Availability Process Reservation Update Itinerary Sync. DB Return Itinerary SouthAir WS SA DB NA DB The client sends the Guest Itinerary for reservation processing. The business process enumerates the travel preferences. These include the travel date, food preference, seating preference, and information like maximum travel stop overs. It then finds a suitable airline that matches the customer's preference. The above business process does an availability check on partner airlines based on the travel preference. It then updates the itinerary and sends it back to the client. Finally the airline's DBs are synced to reflect the current seat status. Note that NorthAir Web Service and SouthAir Web Service work independently of each other and need not know that they are part of a business process or that they are being orchestrated. This kind of process can be implemented in BPEL easily. Throughout Chapter 10, we will discuss various business processes examples.
  • 34.
    Chapter 1 [ 19] In all the chapters of this book, we will use the same company as an example (AirAlliance) and will design solutions to improve the architecture of our company. The Enterprise Stack Before proceeding with a solution for the AirAlliance problem, you need to understand the tools stack that will be used in this book. Let us briefly discuss the enterprise tools. In the following figure, the left side shows the tasks that you are most likely to perform and the right side shows the tools that you use to perform those tasks. The AirAlliance company collaborates with many partner airlines through their web services. For designing and building web services, we'll be using the NetBeans IDE's web service creation methods. For simplicity, all our airlines web services are deployed as a stateless session beans.
  • 35.
    Enterprise Application Development [20 ] Once you have the partner services ready, you will build the business processes that interact with the partner services. Our business processes are implemented as BPEL processes. There could be BPEL processes for each operation like Reservation BPEL Process, Flight Information Business Process and Baggage Information Business Process. We use the NetBeans IDE's BPEL Designer that comes with the NetBeans Enterprise Pack for designing these processes. When we have the business processes ready, we create JBI Modules so that they can be deployed as a service assembly in the BPEL Engine. We use NetBeans's Composite Application Module to build these deployable applications. Based on the need, we might use the CASA Editor to edit the Composite Applications' deployment descriptors. When we have the deployable enterprise application, we deploy them to the Glassfish's BPEL Engine as a Service Assembly. There is a robust visual tool for monitoring the business processes, message transaction and status through a BPEL Process Monitor. You can also use the Java DB for storing airline information. NetBeans has very good support for managing the Java DB from the IDE. So these are the required tools to get you started with building your enterprise applications. Summary This chapter provided an overview of SOA and the need for SOA in enterprise applications. SOA will mean different integration patterns to different companies. There is not a single implementation of SOA that can be termed the best. Implementing SOA in your enterprise applications depends mostly on your business requirements. BPEL is widely accepted as the means to orchestrate disparate web services to conceive meaningful business processes. What BPEL does to your business transaction is explained in this chapter with an imaginary airline. This chapter also dealt with the need for SOA tools for rapidly building and deploying enterprise grade applications. The tools used in this book are shipped with the NetBeans IDE and the OpenESB 2.0 bundle. The next couple of chapters introduce the NetBeans SOA Tools and the NetBeans IDE and highlight various features and functionalities of the SOA Tools. Some of these are the BPEL Designer, Activities Palette, BPEL Mapper, and XML Schema Editors. All of them are available as part of the OpenESB-NetBeans bundle. Chapter 2 deals with the information that you need to quickly get started with these tools.
  • 36.
    Getting Started In Chapter1, we discussed some general SOA concepts related to building scalable enterprise applications. As we discussed earlier, there could be different ways of implementing enterprise applications using different tools available in the market. In this book, we will restrict our views on SOA to designing web services and focus on the BPEL orchestration to perform complex business processes. We will build Java EE-based web services and BPEL-based processes using the NetBeans IDE and SOA tools available with NetBeans. Any detailed discussion on any tool, apart from the SOA tools, could be considered as out of the scope for this book and is left to the reader to compare and understand the differences. In this chapter, we will discuss: Getting the software Setting up the environment NetBeans projects Enterprise tools and editors Getting the Software For enterprise application development using Java EE and web services, the most commonly used IDE is the NetBeans IDE. We can obtain the NetBeans IDE as a built-in feature in the following software: NetBeans IDE 6.0 OpenESB • • • • • •
  • 37.
    Getting Started [ 22] NetBeans IDE 6.0 You need to install NetBeans IDE 6.0 or higher to have the base IDE for creating Java EE-based web services. The software can be obtained from http://www.netbeans. org. Just follow the links specific to a version. NetBeans IDE 6.0 comes with SOA capabilities and includes the GlassFish Application Server. NetBeans SOA tools contains open-sourced features from Sun's Java Studio Enterprise and Java CAPS products, as well as new features for creating composite applications, BPEL-based web services, secure Java EE web services, and XML artifacts like XML schema and WSDL. With these tools, you should be able to: Visually Design: You will be able to visually design an XML schema and visualize BPEL-based orchestration of web services using a flowchart-like interface. Here you can concentrate on the design part while the IDE bothers with the syntax and specification compliance. Test: You should be able to test your composite applications without leaving your design and development environment. In other words, a single interface for building, testing, and deploying enterprise applications. Secure Applications: You should be able to secure your enterprise application using available identity solutions and built-in IDE tools. Integrated BPEL Engine: You don't need a standalone application server for deploying your web services. Most popular applications servers, including GlassFish Application Server and the Sun Java System Application Server, can be integrated and managed from the IDE. BPEL Engine is available as a JBI Service Engine on both the servers. OpenESB You can also download the OpenESB bundle from the OpenESB project site: https://open-esb.dev.java.net. The OpenESB bundle includes NetBeans IDE 6.0 along with GlassFish Application Server, SOA tools, and JBI components. The following table compares the NetBeans 6.0 bundle and the OpenESB 2.0 bundle: Functionality NetBeans 6.0 bundle OpenESB 2.0 bundle BPEL–Support for BPEL-based business processes—you can use the BPEL Designer to design and implement processes that can orchestrate Java EE-based web services. Yes Yes • • • •
  • 38.
    Chapter 2 [ 23] Functionality NetBeans 6.0 bundle OpenESB 2.0 bundle Composite Applications Support—BPEL Modules can be combined into a composite application and can be deployed as a composite application to a JBI runtime. Yes Yes. Support for editing composite applications. Intelligent Event Processing—real-time business event collection and processing. No Yes Editing XSLT Yes Yes Editing WSDL Yes Yes We recommend that you go with OpenESB 2.0 bundle Setting up the Environment In this book, we will assume that you have already installed the NetBeans IDE. If you need help installing the NetBeans IDE, visit the NetBeans site at http://www.netbeans.org/. When you configure your environment successfully as per the installation document, clicking on Servers in the Services tab will show you a list of available servers. Right-click on GlassFish and select the Start option. This will initiate the GlassFish startup process, which you will be able to see in the output screen. After GlassFish Server is started, expand JBI | Service Engines and verify sun-bpel-engine and other engines shown as follows:
  • 39.
    Getting Started [ 24] NetBeans SOA bundle installs and configures the bundled GlassFish Application Server and Sun Java System Access Manager. You need Sun Java System Access Manager for managing identities. When GlassFish Application Server is started, the BPEL Service Engine may not be started automatically. However, when you deploy your first composite application, the BPEL service engine starts automatically. If you experience problems while installing or running the software, see the list of issues for workarounds and known issues in the Release Notes at http://www.netbeans.org/community/releases/60/relnotes.html. Now that we have both the GlassFish Application Server and the IDE environment setup, we need to start the Java DB database and check to see if we can connect to any default DB. Use Tools | Java DB Database | Start Java DB Server to start the integrated Java DB Server. Some of the examples we build in this book use the Java DB as the data store. You can use any JDBC-compliant DB for your projects. Starting from NetBeans 6.0, you can also connect to PostgreSQL DB, which is most widely used by the community. Java DB has an advantage of being completely managed from the NetBeans run-time environment.
  • 40.
    Chapter 2 [ 25] NetBeans Projects NetBeans add-ons are pieces of software that extend the functionality of the base IDE. When NetBeans is installed with the SOA options, New Project types are created that allow you to work with a specific enterprise artifact. The general categories of NetBeans projects include Web, Enterprise, SOA, NetBeans Modules, Java, JBI Components.
  • 41.
    Getting Started [ 26] The NetBeans IDE offers comprehensive GUI support for building enterprise applications and rich client applications on the NetBeans platform. Throughout this book, we will be creating projects that belong to the Web, Enterprise, and SOA categories. Starting from NetBeans 6.0, the following project types are supported: 1. BPEL Module: This project lets you create a BPEL Module that can hold one or more BPEL processes. Refer to Chapter 5 on BPEL Designer for more information. 2. IEP Module: This project lets you create an Intelligent Event Processing Module, which may contain one or more intelligent event processors. The IEP Module Projects works with Service Oriented Architecture or Composite Application projects to generate service engine deployment assembly for event processor deployment. Refer to Chapter 8 on IEP for more information. 3. Composite Application: This project lets you create a Composite Application project, which may include one or more BPEL Modules, and other types of Java Business Integration (JBI) modules. 4. SQL Module: You can create a CAPS SQL Module project from this option. 5. XSLT Module: Creates an empty XSLT Module project, which may contain multiple XSLT services. We will not be exploring other project types in order to restrict the focus of this book to BPEL. Summary This chapter gave a detailed explanation about the software required for working with this book along with the installation instructions. The next chapter describes the Service Engines and other JBI components supported by OpenESB NetBeans bundle.
  • 42.
    Service Engines In Chapter1, we introduced the concept of SOA applications, and introduced BPEL processes and JBI applications. To gain a greater understanding of these concepts and to enable us to develop enterprise level SOA applications, we need to understand JBI in further depth, and how JBI components can be linked together. This chapter will introduce the JBI Service Engine and how it is supported within the NetBeans Enterprise Pack. In this chapter, we will discuss the following topics: Need for Java Business Integration (JBI) Enterprise Service Bus Normalized Message Router Introduction to Service Engines NetBeans Support for Service Engines BPEL Service Engine Java EE Service Engine SQL Service Engine IEP Service Engine XSLT Service Engine Need for Java Business Integration (JBI) To have a good understanding of Service Engines (a specific type of JBI component), we need to first understand the reason for Java Business Integration. • • • • • • • • • •
  • 43.
    Service Engines [ 28] In the business world, not all systems talk the same language. They use different protocols and different forms of communications. Legacy systems in particular can use proprietary protocols for external communication. The advent and acceptance of XML has been greatly beneficial in allowing systems to be easily integrated, but XML itself is not the complete solution. When some systems were first developed, they were not envisioned to be able to communicate with many other systems; they were developed with closed interfaces using closed protocols. This, of course, is fine for the system developer, but makes system integration very difficult. This closed and proprietary nature of enterprise systems makes integration between enterprise applications very difficult. To allow enterprise systems to effectively communicate between each other, system integrators would use vendor-supplied APIs and data formats or agree on common exchange mechanisms between their systems. This is fine for small short term integration, but quickly becomes unproductive as the number of enterprise applications to integrate gets larger. The following figure shows the problems with traditional integration. As we can see in the figure, each third party system that we want to integrate with uses a different protocol. As a system integrator, we potentially have to learn new technologies and new APIs for each system we wish to integrate with. If there are only two or three systems to integrate with, this is not really too much of a problem. However, the more systems we wish to integrate with, the more proprietary code we have to learn and integration with other systems quickly becomes a large problem. To try and overcome these problems, the Enterprise Application Integration (EAI) server was introduced. This concept has an integration server acting as a central hub. The EAI server traditionally has proprietary links to third party systems, so the application integrator only has to learn one API (the EAI server vendors). With this architecture however, there are still several drawbacks. The central hub can quickly become a bottleneck, and because of the hub-and-spoke architecture, any problems at the hub are rapidly manifested at all the clients.
  • 44.
    Chapter 3 [ 29] Enterprise Service Bus To help solve this problem, leading companies in the integration community (led by Sun Microsystems) proposed the Java Business Integration Specification Request (JSR 208) (Full details of the JSR can be found at http://jcp.org/en/jsr/ detail?id=208). JSR 208 proposed a standard framework for business integration by providing a standard set of service provider interfaces (SPIs) to help alleviate the problems experienced with Enterprise Application Integration. The standard framework described in JSR 208 allows pluggable components to be added into a standard architecture and provides a standard common mechanism for each of these components to communicate with each other based upon WSDL. The pluggable nature of the framework described by JSR 208 is depicted in the following figure. It shows us the concept of an Enterprise Service Bus and introduces us to the Service Engine (SE) component: JSR 208 describes a service engine as a component, which provides business logic and transformation services to other components, as well as consuming such services. SEs can integrate Java-based applications (and other resources), or applications with available Java APIs. Service Engine is a component which provides (and consumes) business logic and transformation services to other components. There are various Service Engines available, such as the BPEL service engine for orchestrating business processes, or the Java EE service engine for consuming Java EE Web Services. We will discuss some of the more common Service Engines later in this chapter.
  • 45.
    Service Engines [ 30] The Normalized Message Router As we can see from the previous figure, SE's don't communicate directly with each other or with the clients, instead they communicate via the NMR. This is one of the key concepts of JBI, in that it promotes loose coupling of services. So, what is NMR and what is its purpose? NMR is responsible for taking messages from clients and routing them to the appropriate Service Engines for processing. (This is not strictly true as there is another standard JBI component called the Binding Component responsible for receiving client messages. Binding Components are discussed in Chapter 4. Again, this further enhances the support for loose coupling within JBI, as Service Engines are decoupled from their transport infrastructure). NMR is responsible for passing normalized (that is based upon WSDL) messages between JBI components. Messages typically consist of a payload and a message header which contains any other message data required for the Service Engine to understand and process the message (for example, security information). Again, we can see that this provides a loosely coupled model in which Service Engines have no prior knowledge of other Service Engines. This therefore allows the JBI architecture to be flexible, and allows different component vendors to develop standard based components. Normalized Message Router enables technology for allowing messages to be passed between loosely coupled services such as Service Engines. The figure below gives an overview of the message routing between a client application and two service engines, in this case the EE and SQL service engines.
  • 46.
    Chapter 3 [ 31] In this figure, a request is made from the client to the JBI Container. This request is passed via NMR to the EE Service Engine. The EE Service Engine then makes a request to the SQL Service Engine via NMR. The SQL Service Engine returns a message to the EE Service Engine again via NMR. Finally, the message is routed back to the client through NMR and JBI framework. The important concept here is that NMR is a message routing hub not only between clients and service engines, but also for intra-communication between different service engines. The entire architecture we have discussed is typically referred to as an Enterprise Service Bus. Enterprise Service Bus (ESB) is a standard-based middleware architecture that allows pluggable components to communicate with each other via a messaging subsystem. Now that we have a basic understanding of what a Service Engine is, how communication is made between application clients and Service Engines, and between Service Engines themselves, let's take a look at what support the NetBeans IDE gives us for interacting with Service Engines. Service Engine Life Cycle Each Service Engine can exist in one of a set of predefined states. This is called the Service Engine life cycle. Started Stopped Shutdown Uninstalled The figure below gives an overview of the life cycle of Service Engines: • • • •
  • 47.
    Service Engines [ 32] Service Engines can be managed from the command line utility, asadmin, that is supplied as part of the Sun Java System Application Server. The table below shows some of the common commands that can be used to manage Service Engines: asadmin list-jbi- service-engines Obtains a list of installed Service Engines $./asadmin list-jbi-service-engines sun-aspect-engine sun-bpel-engine sun-dtel-engine sun-etl-engine sun-iep-engine sun-javaee-engine sun-script-engine sun-sql-engine sun-wlm-engine sun-xslt-engine Command list-jbi-service-engines executed successfully. asadmin show-jbi- service-engine Shows the status of an installed Service Engine $./asadmin show-jbi-service-engine sun- bpel-engine Component Information --------------------- Name : sun-bpel-engine State : Shutdown Description : This is a bpel service engine. asadmin start-jbi- component Starts a Service Engine $./asadmin start-jbi-component sun-bpel- engine Started component sun-bpel-engine. asadmin stop-jbi- component Stops a Service Engine $./asadmin stop-jbi-component sun-bpel- engine Stopped component sun-bpel-engine.
  • 48.
    Chapter 3 [ 33] Service Engines can also be managed from within the NetBeans IDE instead of using the asadmin application. We will look at that in the next section. Service Engines in NetBeans As we discussed in Chapter 2, the NetBeans Enterprise Pack provides a version of the Sun Java System Application Server 9.0 which includes several Service Engines from the Open ESB project. All of these Service Engines can be administered from within the NetBeans IDE from the Services explorer panel. Within this panel, expand the Servers | Sun Java System Application Server 9 | JBI | Service Engines node to get a complete list of Service Engines deployed to the server.
  • 49.
    Service Engines [ 34] The NetBeans Enterprise Pack 5.5 and the NetBeans 6.0 IDE have different Service Engines installed. The following table lists which Service Engines are installed in which version of the NetBeans Enterprise Pack: Service Engine Name Description NetBeans 6.0 NetBeans 5.5 sun-aspect-engine Aspect Service Engine Yes No sun-bpel-engine BPEL Service Engine Yes Yes sun-dtel-engine DTEL Service Engine Yes No sun-etl-engine ETL (Extract, Transform and Load) Service Engine Yes No sun-iep-engine IEP (Intelligent Event Processor) Service Engine No No sun-javaee-engine Java EE Service Engine Yes Yes sun-script-engine Scripting Service Engine Yes No sun-sql-engine SQL Service Engine Yes No sun-wlm-engine WLM (Work List Manager) Service Engine Yes No sun-xslt-engine XSLT Service Engine Yes No In the previous section, we discussed the life cycle of Service Engines and how this can be managed using the asadmin application. Using the NetBeans IDE, it is easy to manage the state of a Service Engine. Right-clicking on any of the Service Engines within the Services explorer shows a menu allowing the life cycle to be managed as shown in the figure below: To illustrate the different states in a Service Engine life cycle, a different icon is displayed:
  • 50.
    Chapter 3 [ 35] Start Stop Shutdown Uninstalled The service engine is not displayed in the list. Now that we have a good understanding of what Service Engines are, and what support the NetBeans IDE provides, let's take a closer look at some of the more common Service Engines provided with the NetBeans Enterprise Pack. BPEL Service Engine Similar to all the other Service Engines deployed to the JBI Container within the Sun Java System Application Server and accessible through NetBeans, the BPEL Service Engine is a standard JBI Compliant component as defined by JSR 208. The BPEL Service Engine enables orchestration of WS-BPEL 2.0 business processes. This enables a work flow of different business services to be built as shown in the following figure:
  • 51.
    Service Engines [ 36] Within NetBeans, we can create BPEL modules which consist of one or more BPEL processes. BPEL modules are built into standard JBI component, and then deployed to the JBI container where the BPEL Service Engine allows the processes within the module to be executed. In JBI terms, this is called a Service Unit. A Service Unit is a deployable component (jar file) that can be deployed to a Service Engine. New BPEL modules are created in NetBeans by selecting the File | New Project menu option and then selecting BPEL Module from the SOA category as shown in the following figure:
  • 52.
    Chapter 3 [ 37] Within a BPEL module project, we add BPEL Processes. These processes describe the orchestration of different services. All the standard operations specified by WS-BPEL 2.0 Specification (like Providing and Consuming Web Services, Structuring the processing logic, and performing basic activities such as assignments and waiting) are available within the BPEL Service Engine. The NetBeans designer provides simple drag-and-drop support for all of these activities. Consider, for example, a service for generating license keys for a piece of software. In a Service Oriented Architecture, our system may consist of two services: 1. A Customer Service: this service would be responsible for ensuring that license requests are only made by valid customers. 2. A License Generation Service: this service would be responsible for generating valid license keys. Within NetBeans, we can create a BPEL process that ties these services together allowing us to return valid license keys to our customers and details of purchasing options to non-customers.
  • 53.
    Service Engines [ 38] Java EE Service Engine The Java EE service engine acts as a bridge between the JBI container allowing Java EE web services to be consumed from within JBI components. Without the Java EE service Engine, JBI components would have to execute Java EE Web Services via remote calls instead of via in-process communication. The Java EE Service Engine allows both servlet and EJB-based web services to be consumed from within JBI components. The Java EE Service Engine provides several benefits when executing Java EE Web Services. Increased performance Transaction support Security support These are explained in the following subsections. • • •
  • 54.
    Chapter 3 [ 39] Increased Performance Using the Java EE service engine enables Java EE web services to be invoked in process within the same JVM, as the services are running. This eliminates the need for any wire-based transmission protocols and provides increased performance. Transaction Support Using an in-process Communication Model between Java EE Application Server and JBI container allows both web services and JBI modules to use the same transaction model. Through multiple web service calls and calls to other JBI modules. For example, BPEL processes can all use the same transaction. Security Support When executing Java EE Web Services from within the JBI container, the Java EE Service Engine allows security contexts to propagate between components. This removes the need to authenticate against each service. SQL Service Engine SQL service engine allows SQL statements to be executed against relational databases and allows the results of SQL statements to be returned to the client application or other Service Engines for further processing. SQL service engine allows SQL DDL (Data Definition Language), SQL DML (Data Manipulation Language), and stored procedures to be executed against a database. This, therefore, allows different scenarios to be executed against the database. For example, obtaining a customer's address or the number of outstanding invoices a customer may have. Within NetBeans, the SQL module is used to interact with the SQL Service Engine. The SQL module project consists of three artifacts as follows: configuration xml file (connectivityInfo.xml) one or more SQL files containing distinct SQL statements WSDL file describing the SQL operations. • • •
  • 55.
    Random documents withunrelated content Scribd suggests to you:
  • 56.
    mutual faith bya single doubt. I have given him my confidence, and that was all I had to bestow. Well! as some sensible poet remarks, and I quite agree with him, said Agnes, with a peevish, discontented sigh—
  • 57.
    The maid thatloves, Goes out to sea upon a shattered plank, And puts her trust in miracles for safety. No, Agnes! Those who have loved lightly may change as lightly, but I should little deserve the inestimable happiness of having known Mr. Granville so entirely, did I not always believe him above the suspicion of caprice. We have read each other's mind and heart, we have been willing to trust each other in life and till death; therefore now, unless Richard were to tell me with his own lips that he had changed, I would not believe it,—and scarcely even then! This alone is affection that deserves the name, not to torment him with distrust, nor to take up the first cause of offence, but with unenquiring confidence to judge him as I would myself be judged. It would add a pang to the sorrow of separation if we believed ourselves at the mercy of every idle suspicion; but I know his heart to be as incapable of deceit or dishonor as my own. In the mean time, Mr. Granville had continued to write from abroad with unceasing assiduity, believing that some unexpected obstacle must have occurred to prevent Marion from answering his letters, but never suspecting that she did not receive one of the many he had written. In his candid and elevated mind, there was no room for jealousy or suspicion, and conscious that the transparent nature of Marion's nature admitted of no concealments, he rejected every angry or impatient thought. The more he saw of other society, the more dear she became to his memory now, while his attachment was of that deep and lasting kind over which the accidents of life have no influence. Miss Dunbar, said Captain De Crespigny, one evening, placing himself on a sofa beside Marion, while Sir Patrick, to whom he had been speaking very earnestly some minutes before, anxiously watched her countenance from a distance: I wish you were now
  • 58.
    seated in oneof Merlin's chairs, from which no one can rise till a story be finished. I have something to say, so important to myself, and let me hope also to you, that I expect to be heard to the end. Of course, if you wish it, replied Marion, in a faltering, agitated voice. But, Captain De Crespigny, allow me to remark how unlikely it is that any subject can very deeply interest us both. I trust and hope we fully understand each other. It is time, indeed, that we should, replied he with emotion. And if I dare say all I wish, it would still be less than I feel. Dunbar assures me you are still at liberty to consult only your own inclinations, and let me hope I am not entirely the dupe of my own vanity, in believing that I might yet conquer your indifference. Since the hour when we first met, I had eyes for no one but yourself. Even when we could not converse I have watched you with ceaseless interest, and am forever thinking of you in absence, counting the hours of my existence only by those passed in your society. Why, then, do you so obviously avoid me? Why am I for ever made the companion of Miss Smythe or Miss Anybody-else? You know and see that my whole object in life is, to remain beside yourself. Every look, word, and action tells you as plainly as language can speak, that I love you to distraction, that my attachment has not been hastily formed, to be as hastily laid aside, and now my only apprehension is, that by too openly disclosing my feelings the confession may separate us for ever, yet it can no longer be delayed, for I must know at once now, whether I am to be happy or miserable for life? Patrick has done very wrong, faltered Marion, while tears sprang into her eyes, I told him long ago to let you know all. It is most unfortunate that your preference should be given to one of the very few who never can return it. You ask for a heart which is not mine to give. My engagement to Mr. Granville cannot be soon fulfilled, but while we both live, we shall live only for each other.
  • 59.
    That, Dunbar assuresme, can never take place, replied Captain De Crespigny, while a dark red flush passed over his countenance; and till it does, I cannot cease to hope. Nothing is more annoying, I know, than the perseverance of an unrequited attachment, but I must cling to the faint and haggard hope which remains. A mere taper is extinguished by being blown upon, but a fire burns only the brighter. The greatest felicity of life would not be good enough for you, nor so much as I wish you, provided only we share it together; but with another, I cannot wish you happiness. No! the words would choke me. May you never find any till you find it with me. If you can ever feel one relenting thought in my favor,—if, dissatisfied with another, you think with even momentary regret of me, then, were I at the extremity of the earth, let me but know it, and you shall find that I have been true as the dial to the sun, even though not brightened by its light. Captain De Crespigny continued with vehemence of tone and manner which nothing could interrupt, while Marion's countenance became more and more expressive of grief and confusion. If I have been to others the reckless, inconstant, and unprincipled being you think, all who ever suffered a pang on my account are now revenged. I never really loved any one but you! All else was fancy—vanity—any thing but love. Were others like you, there could be no changeableness or caprice, but never have I seen before, and never shall I see again, so much to attract affection and to secure constancy. Hereafter a solitary recollection of the hours spent with you will be my only remaining happiness. Happiness!! there is no such word for me, now! You, who delight in making all others happy, would condemn me to misery! The thought of my defeated hopes will forever ring upon my heart. The remembrance, that when I asked that of you, which I never asked before, you coldly and indifferently rejected me.
  • 60.
    Not indifferently, butwith heartfelt gratitude for your disinterested preference, answered Marion, in a low, agitated voice. If already married to another, I could not be more decided in saying, that you must never renew the subject again, for I owe it to you, as much as to myself and Richard, to say that my answer is final,—that we never can be more to each other than friends, but that I sincerely hope the time may come, when we shall meet as we did formerly, without emotion, but with kind and cousinly regard. Never! oh never! The very thought shows you have never loved as I do! I could not be in the same room with you,—no! not in the same kingdom. You may pity, if you cannot love me, replied Captain De Crespigny, with a deep gasp of acute disappointment; and seizing his hat, he rushed out of the house, nearly suffocated by contending emotions; but as he ran, rather than walked, towards his lodgings, the first and foremost of his thoughts was, under all circumstances, and at all hazards, to persevere with unalterable pertinacity, and only with his dying breath, to resign the hope of success.
  • 61.
    CHAPTER XL. Life isindeed a complicated and mysterious drama, in which Agnes felt more and more dissatisfied with the part she had to play. Harrowgate had been the threatre of many interesting scenes to her; but now Lord Doncaster had departed with a vaguely-expressed hope of her visiting him at Kilmarnock Abbey; and when Sir Arthur felt sufficiently recovered to begin his long-desired progress towards home, she slowly and sadly prepared to accompany him. Before they reached Portobello, winter had already covered the earth in a shroud of snow and of ice; the birds no longer carolled gladly on the boughs; the rustling leaves had ceased to fall; the naked trees hung their dejected branches, in bare and stern desolation, and the blood-red sun glittered on the cold and barren fields. Winter's dumb. All life and joyfulness had departed from the face of nature, which looked, as Agnes remarked, like a wedding-cake without the ornaments; and amidst weeks of dreary discontent, she compared the death-like contrast of nature now, from what it had been, to her own sadly altered feelings. She appeared constantly now to be in a state of restless, almost feverish excitement, always, evidently, expecting some event which never happened, while she became daily more depressed and irritable. Marion, in the mean time, during many a long and dreary evening, resolutely buried beneath a smiling aspect, her own anxiety respecting Mr. Granville's unaccountable silence, and devoted herself as entirely to Sir Arthur's comfort, as if there had not existed another being upon the earth; yet still, every knock at the door made her heart palpitate with hope, and every note brought into the room, caused her a new pang of disappointment and surprise.
  • 62.
    If a grainof hope or joy were to be found in any circumstances, Marion's was a mind to sift out and enjoy it; and her buoyant spirit now shielded her from a too sensitive apprehensiveness, while she repelled the withering fears that might have forced themselves on a heart less candid and trusting. Her whole spirit rebelled against a vagrant thought of Richard Granville's inconstancy or indifference; though in Sir Patrick's letters from the continent, there was much that might have insinuated distrust into her thoughts; but Marion clung to the unswerving belief of her lover's infallible truth. She knew that the stamp of Christian excellence was on his whole character, engrained in his very being, and only to decay with life itself; therefore her opinion was not at the mercy of any idle representations; but the blast which might have uprooted a superficial attachment, only deepened the root of her own, which nothing could undermine. Mr. Granville, in the mean time, having long ceased to hope for any answer to his letters, became more and more impatient for the time when he might seek a personal interview with Marion, of whose constancy not a doubt ever crossed his imagination; while day after day he watched with saddening apprehension over the declining health of his sister, whose failing strength required all the affectionate attentions he lavished on her, especially when, after a few weeks, Sir Patrick also arrived at Florence, and Clara shrunk with blighting, heart-broken grief, from every engagement that might endanger her meeting him. She mournfully acknowledged, that having at first esteemed as well as loved him, she was still unable to conquer her misplaced affection; and that while nothing could induce her to unite her fate to Sir Patrick's, or to place her happiness in his care, still the painful consciousness that he was unworthy and dishonored, weighed the more deeply upon her spirit, and crushed her whole heart with anguish. The constancy with which Sir Patrick tried to regain her affection was deeply touching to Clara's young mind; and in vain she tried to
  • 63.
    blot out hisname with her tears. Still, Mr. Granville, with inextinguishable hope, continued to believe that the germ of life must be stronger than it seemed; but day after day she faded and drooped. Change of air had done less than nothing for Clara's feeble frame and wasted strength; while she spoke often, with a smile of affectionate interest, respecting her brother's future life, though he observed with emotion, that her own name was never included, and that only when talking of a world hereafter, did she speak now of their being together. We must die to be perfectly happy, observed Clara, one day, in a tone of calm and elevated peace. My sun has set in the morning, Richard; and it might have seemed hard thus early to leave such a world, so beautiful, so fragrant, so joyous, and embellished by such affection as yours; but we know that sin has destroyed this whole magnificent creation; that misery, decay, and death, are hid beneath all. It is the glorious discovery of Christianity that we are immortal; that we are created, not for time, but for eternity! So long as my spirit continues to lodge in this most fragile of human bodies, I must have sorrow and suffering to prepare me for throwing off the homely garb of an earthly nature, and assuming the glorious garments of heaven. Mr. Granville covered his face with his hands, unable for some moments to reply, while Clara continued, in a tone of solemn sadness and fervent emotion— The near approach of death fills my heart with strange and wonderful thoughts! When, like the lightning from the cloud, my soul departs from the body, O then, Richard, how I shall learn to know the value of our immortal salvation! It bewilders me now to think, that I myself shall survive that glorious sun, the solid earth, and all the wonders around us; that I shall see and understand all the miracles of creation; that I shall know and love all the wisest and best of human beings who ever existed on the earth; and that I shall
  • 64.
    then be wiserthan the wisest, as well as happier than the happiest of mortals. Richard! that is marvellous! and were it not for leaving you, I could rejoice with a joy that is unspeakable, and full of glory. Mr. Granville clasped Clara's emaciated hand in his own, and would have spoken, but his voice failed; and after an ineffectual effort, fearful of agitating his sister, he turned away and was silent; but she saw his unutterable grief, and continued, You could have borne this better if it had been yourself, Richard; but I leave you in the hands, not only of an atoning Saviour, but also of a sympathising friend, who will send you comfort according to your utmost need; and, my dear brother, let us now remember, that as the infidel La Harpe said, there is one text in Scripture sufficient either to live or to die on, 'God so loved the world, as to give his only Son, that whosoever believeth on Him should not perish, but have everlasting life.' Mr. Granville solemnly bent his head in token of acquiescence, and closed his eyes, but large tears, notwithstanding every effort, coursed each other down his face, and he avoided looking round, while Clara in tremulous accents continued— Before long I shall live only in your memory, and well do I know the place you will give me there; but remember, dear Richard, when my mortal frame is dissolved, that you will have another relative then awaiting you in heaven, and that I shall yet be in as active a state of consciousness there as here. When we are separated, you must still sometimes revive old times, by reading with Marion the books I have loved—by listening to the music I have delighted in—by walking in my accustomed haunts at home—by rearing my favorite flowers— and most of all, console yourself, my dear brother, by reflecting, that when you and Marion are both worshiping God together on earth, I shall also be adoring Him in heaven:— 'Tis sweet, as year by year we lose
  • 65.
    Friends out ofsight, in faith to muse How grows in Paradise our store.' The wintry year rolled on till Christmas eve, when Agnes, with a discontented yawn, loudly wished that she had been born in the planet Jupiter, where there was no winter at all. That night she announced after tea to Sir Arthur, that she was about to leave home for several weeks next day, being engaged to spend some time with her friend, Mrs. O'Donoghoe. A considerable air of trepidation appeared in her voice and manner when she spoke; and Marion, having recently observed that her sister's thoughts were continually pre-occupied, felt startled and amazed at the look of agitated determination with which she intimated her approaching departure, after which she hurried towards the door, anxious apparently to avoid all discussion; but Sir Arthur, in a tone of mild authority, called her back, and drawing in his breath between his compressed lips with evident vexation, he assumed an air of grave but ironical humor. May I take the liberty of inquiring, Agnes, whether you have fully investigated all the stories we heard at Harrowgate respecting Mrs. O'Donoghoe's former connection with Lord Doncaster, and what she actually is, before I consent, on very short notice, to entrust her with my niece. Oh! she is everything on earth most delightful! You need not have a minute's anxiety about me, uncle Arthur! I can take excellent care of myself. Nobody knows my own value better than I do! Convince me of that, Agnes, if possible; but you are aware that my whole heart abhors your recent very unaccountable intimacy with that contemptible old roue, who shall be nameless, replied Sir Arthur, with strong, deliberate emphasis. Any continuance of that exceedingly familiar intercourse would be utterly improper; and as for a young girl of your appearance setting out on a wild ramble with
  • 66.
    any Irish adventuressrecommended by Lord Doncaster, let me hear of her having some very different introduction, or I cannot allow you to go. My dear uncle! I would dig my own grave and bury myself, if anything prevented me! As for your permission, exclaimed Agnes, her whole face illuminated with angry eagerness, I shall certainly be most happy to have it; but if people strain the cord too tight, it sometimes snaps altogether. I have made myself a positive promise never to decline a good offer, and go I must. Mrs. O'Donoghoe is to take me in her own carriage, free, gratis, and for nothing. Only think how very kind! My dear Agnes, replied Sir Arthur, while his brow darkened with mournful anxiety, I cannot wonder if you tire of the dull, monotonous house I have to offer you. A perfect mausoleum indeed! It is a premature old age for girls like you and Marion to be, evening after evening, the companions of a solitary old man. Often, of late, have I considered in vain how it could be remedied. Yet, my dear girl, there might be a solitude far worse, if you lose the respect of others, and the peace of mind you may enjoy with me. Hearing what I have lately done of Mrs. O'Donoghoe, and knowing all I do of Lord Doncaster and the Abbe Mordaunt, I must lay my positive prohibition on your accompanying them now. You may think me a whimsical old man; but, Agnes, you cannot long be troubled with my care. Loaded as I am with the weight of years and infirmities, my life is like a spark on the ocean. Its fleeting joys and troubled thoughts are drawing rapidly to a close; but if these were the last words I am ever to speak, you must not go unprotected into such society. The Admiral walked with slow and musing steps up and down the room, his fine countenance flushed with agitation, and his eyes shaded by his long white hair, exhibiting an expression of mournful solicitude. Marion's heart swelled with agitation, while inwardly moralizing on the officiousness of Irish widows, and Agnes bit her
  • 67.
    beautiful lip witha look of resolute determination, flashing glances of angry surprise at her uncle, and pouting her beautiful lip, though the reverence which Sir Arthur never failed to inspire kept her silent. Tell me, Agnes, continued he, stopping at length before her, with a look of benignant kindness, is there anything within the compass of my powers that could be done to make up for this disappointment? We who are old must not forget that there are pleasures for the young which they naturally wish to enjoy. If there be any place you wish particularly to see—— It is not places, but people, that I care for! interrupted Agnes, peevishly. With respect to this excursion, it is impossible for me to get off. I shall go deranged if you interfere with it! The party is made on purpose for me, the horses are bespoken, my things all sent to Mrs. O'Donoghoe's, and nothing left for me but to bid you good- bye! This is little short of an elopement, Agnes! replied Sir Arthur, with a mild but resolute countenance, while there was a tone of strong resentment in his voice. What good object can there be in a scheme so clandestinely begun! But I have no legal authority to detain you, if affection and kindness are insufficient!—One thing only let me say, painful as it is to my feelings, added the Admiral, while his whole frame shook with emotion, and he walked several times across the room. In the name of your father, Agnes, I forbid you to leave my roof with the party you speak of; and if, in defiance of all propriety, you do go, then—I would have said, never return here again; but no!—I cannot say that to my brother's child. No!—till my home is in the grave, you may share it with me. Come back when you will, Agnes, and if I am alive, you shall be welcomed. Marion caught the hand of Sir Arthur in her own, and kissed it with ardent affection, while she felt a tightening in her throat, and a mist before her eyes, till tears fell fast and thick, like rain, upon her cheek; but Agnes, with whom kindness, in its most impressive form,
  • 68.
    could excite nogenerous impulse, rose in silence, and hurried out of the room. That night, after Marion had been asleep for several hours, she suddenly started up in bed, with that bewildered feeling of perplexity experienced by those who are unexpectedly aroused at an unusual hour. It was four o'clock in the morning, and a pale, cold, livid moon- beam streamed faintly into the room, giving a chilled and spectral aspect to all around. A death-like stillness reigned beside her, and unable to account for having been so suddenly disturbed, she was about once more to consign herself to repose, when she heard the noise, repeated which she had begun to fancy must have been only a dream. She listened in trembling astonishment, for it seemed as if in her uncle's room over-head, some persons were trampling up and down the room, drawers opening and shutting, heavy weights falling on the floor, and a sound sometimes reached her, as if several carpenters were at work. Finding there was no mistake, Marion sprung out of bed, threw on her dressing-gown, rushed up stairs, and having hastily thrown open the door, she stood there transfixed for a moment with amazement and fear. Through the glimmering dawn of light, she saw that Sir Arthur was up, and completely dressed, while he appeared to be hurriedly groping about the room, as if packing up for a journey. He seemed unconscious of Marion's entrance, who stood for several minutes watching him in speechless perplexity and consternation, while her very blood forgot to flow, when she saw the stony look of his eyes. His countenance was of an ashy paleness, his long grey hair matted over his forehead, his expression sad beyond mortality, and when she took his hand in her own, it felt cold and damp. His eyes wandered over her face for a moment, without any apparent recognition, and then giving a smile of utter vacancy, he resumed his occupation with restless eagerness.
  • 69.
    Uncle Arthur! dearuncle Arthur! what are you doing? exclaimed Marion, throwing her arms round him, while her limbs were faint, and trembled with fear. Speak, dear uncle! Speak to your own Marion! Why do you not speak? A deep silence ensued. Sir Arthur evidently did not hear her. His cold, livid lips moved as if he would have spoken, but not a sound became audible, and with the same vacant smile as before, he turned away. The terror-stricken Marion now felt utterly appalled. A death-like sickness came over her, horror and darkness seemed gathering over her mind, and apprehensive lest her senses might entirely fail, she hastily and vehemently rang the bell, calling loudly for assistance. Marion's was an intellect of that high tone which rises to meet a great emergency, and though nearly paralyzed by grief and terror, when she first saw the fearful, ghastly smile, with which her uncle gazed around him, she now endeavored, by gentle persuasion, to make him lie down in his bed, and tried, by speaking in accents of tenderness, to recall his recollection, while impatiently longing for Martin to appear; and during the few minutes that elapsed till he entered, it seemed as if time itself had ceased to move. The doctor was at length summoned, and having pronounced the Admiral's illness to be caused by an oppression of the brain, threatening apoplexy, he attempted to bleed his patient, though almost without success; for Marion observed, while she held him in her arms, that the blood scarcely flowed, till after some time he uttered a fearful, convulsive cry, which rang through the room, and fell back in a violent spasm, the immediate precursor of apoplexy. Awe-struck and paralyzed with grief, Marion clung to her uncle, and remained by his side, watching with deep and solemn affection every turn of his features; while her cheek assumed the hue of death, her tearless eyes were motionless, her quivering lips compressed, and she remained as silent and immoveable as if the mortal shaft had
  • 70.
    reached herself. Withoutshedding a tear or breathing a sigh, she bent over the distorted countenance of Sir Arthur, and assisted in cutting off the long white locks of his hair, which she had often loved to look upon, but which were now strewed all unheeded on the bed, and again seating herself by his side, she riveted his hand in her own, becoming white and motionless as an image of marble. Notice had been sent to Agnes' room of the afflicting event which had taken place, and Marion expected every instant that her sister would appear; but time passed on, and she came not, being one who systematically avoided any scenes of distress, therefore she satisfied herself with sending frequent messages of inquiry to the door. At length, after some hours, Sir Arthur appeared to have recovered his recollection; for he looked at Marion with a feeble smile of deep affection, and laid his hand on her head as if to bless her; but words were denied him; he struggled in vain to speak; and she who had not yet found the solace of a tear, now bursting into an irresistible agony of weeping, sobbed aloud. After gazing long and tenderly in her face, Sir Arthur's eye-lids at length closed with fatigue, and still clasping her hand in his, he fell into a peaceful, quiet slumber of many hours' duration. Those who have most leisure to contemplate death, generally think least about it, and no one had ever meditated less on the subject than Agnes. She occasionally remarked, when the infirmities of the old and the indigent were forced upon her notice, that they might hope soon to be released, and that to them it must, of course, be a happy escape. The busy and active, she thought, had scarcely time to die; and, for herself, she considered death as a very unpleasant subject, which fifty years hence must be attended to, when the joys and the dreams of her present life had vanished; but it seemed to her most preposterous now, to lower her spirits by melancholy reflections on what could not certainly be avoided, and would come only too soon in the end. In short, her whole plan of life was, To- day to sparkle, and to-morrow die.
  • 71.
    Marion had stolenaway to complete her midnight toilette, before she settled for the day beside Sir Arthur's pillow, when she was amazed near the door to meet Agnes, hurrying past in travelling costume, and anxious, apparently, to avoid being seen, though, when an interview became inevitable, she tried to carry it off with careless audacity, being evidently in a perfect delirium of high spirits, which she vainly tried to conceal. Well, Marion! I am quite relieved to hear from Martin that there is not the slightest danger! The doctors also say that everything has taken a favorable turn, though, as for their opinion, I have despised all physicians from Esculapius down to the magnesia-and-rhubarb doctors of the present day. They all tell us the same thing of an invalid, 'If he does not die, he will certainly recover!' Marion listened with a look of grave and melancholy surprise; while Agnes, trying not to seem aware of it, and evidently anxious to avoid any reply, fixed her eyes on the door, as if impatient to proceed, and continued, in rapid accents of assumed bravado— You are looking really ill, Marion, and must have got a dreadful fright! It would have killed me altogether! But make your mind easy, for these attacks are, I am told, very common. The Duke of Middlesex had ten or twelve, and people live often for years after the first, which is a great comfort. They do sometimes, but not always, replied Marion, with mournful gravity. My dear Agnes, do not be too sanguine. This is a very serious attack. You may hope, but I cannot; for it seems to me that our uncle is laid on a bed from which he will never rise again. Oh! you are nervous, after being so frightfully alarmed this morning. It must have been very shocking, said Agnes, shaking her well-arranged ringlets, and attempting to get up a melancholy look; but in her mind there never was any of that gentle, feminine apprehensiveness for others, which is so amiable and so endearing.
  • 72.
    I feel quiteconfident that in a few days he will recover; but for the present, Marion, you see everything through a darkened glass. I have no fears whatever, added she, in a tone of superior wisdom. Old people always remind me of a creaking door, forever complaining, but never any worse! It is lucky for those who have nerves to endure it all. I have none; therefore being of no earthly use here, I should be quite in the way. Indeed, a single week of moping at home, with fright and anxiety, would lay me up also. You are not going, Agnes? Impossible! Listen to me for five minutes. I am not equal to the exertion! What can I do? It is out of the question to break off my engagement now! I am really between the horns of a dilemma, and must be tossed upon one or other of them. Both Mrs. O'Donoghoe and Lord Doncaster have set their hearts upon having me; and, as the schoolboys say in their speeches, 'It must be so! Agnes, thou reason'st well!' If we are sisters, hear me, replied Marion, in accents of breathless indignation. Agnes! you cannot, you must not think of going. But, as the lover says in the Critic, 'I can, I must, I will, I ought, I do!' Marion, you do not know the importance I attach to my excursion, which will last only a few days. As for this absurd affair of Sir Arthur's, you think every breeze a hurricane; but it is well over now, and, since he is ordered quietness, he will miss me the less, or perhaps not at all, if you never mention my absence. Certainly my forte is not in a sick-room, and yours is. My chief fault, as an attendant on sick people, is, that I am good for nothing. As for danger, Marion, I do not see any. Or, rather, you will not see any. Agnes, I would not for ten thousand worlds leave him now. Our best—almost our only friend, and probably dying, exclaimed Marion, while hot, scalding tears rushed in torrents from her eyes. The question now is not, whether Sir
  • 73.
    Arthur will berestored as he was to us? but only, how many days or hours he can be kept from the grave. Every passing moment is a knell of death to my heart, when I think how few more we shall see before he is gone forever. If you consider nothing but mere appearances, Agnes, you ought to stay. As for appearances, replied she, clasping her bracelet, I am of opinion with the Abbe Mordaunt on that point, as on most others, that those who study appearances have seldom any realities to boast of. Such sentiments might be expected from such a man, but I should not certainly have supposed you would act upon them, especially now. Believe me, Agnes, your own heart will reproach you forever after. The danger is immediate and very great, said Marion, while her tears fell drop by drop on the ground. My uncle is hovering over the very brink of the grave, therefore, for my sake, and for his sake, do not leave us. But for my own sake I must! You have a teazing, exaggerated way of stating things; but pray, remember now, Marion, the maxim Madame D'Ambert taught us at school, 'Pour porter legerement la vie, il faut glisser sur bien des choses!' I always prefer hopes to fears, and hate that desolate, dreary look of yours, this morning. You wish to rule and direct everybody, but I will not be governed or trampled on, said Agnes, in an angry imperious tone. I did not suppose as much could be said on any subject in the world as you have said upon this. One would think, from your way of talking, that Sir Arthur was nobody's uncle but yours; or that I did not know how to act for myself! Well! I hope, for my own especial happiness, very soon to be independent of those who never have appreciated me. At all events, we have loved you, Agnes. Yes! of course. Ah! here is the carriage! Good bye, then! Sir Arthur will never miss me while you remain; but write often, though where
  • 74.
    in the wideworld to direct your letters is more than I remember; but, Marion, we see in the Times newspaper every day, advertisements entreating persons who have left their homes to return, that all their wishes may be granted, therefore, when you and Sir Arthur want me back, pray insert something of that kind. Good bye! With heightened color, and eyes fixed on the ground, Marion received the hand of Agnes, and gave her one parting look of expostulation, hoping to the last that nature and feeling might yet make themselves heard; but when Agnes had sprung into Mrs. O'Donoghoe's carriage, and kissed her hand with a parting smile, every trace of agitation vanished from the face of Marion, but a band of iron seemed around her head and her heart, as she slowly turned away, disgusted and astonished at her sister's heartless levity, and in the privacy of her own room, she sank upon her knees and offered up solemn, fervent prayers for the many to whom she was attached, but, above all, for her much-loved uncle.
  • 75.
    CHAPTER XLI. With allthe acute susceptibilities of youth, Marion now experienced, for the first time, what it was to watch over an almost hopeless illness, and, with a shuddering sensation of unutterable woe, she tried to obtain that comfort from above, which nothing on earth could supply. Days passed slowly on, the longest and most melancholy she had ever known, while most of her hours were spent in prayer, but all around was gloom. Nothing could be more oppressive to her than the subdued whisper and stealthy step of Sir Arthur's attendants, his vacant seat, his darkened room, the mute and solemn looks of his physician, and, above all, the inward anguish with which, hour after hour, she sat with his hand in hers, watching the fluctuations of his feeble pulse, observing with awe and grief the pale ensigns of death gathering over his features, and feeling as if every labored breath he drew gave him but a momentary reprieve from the grave, while she could not bear to contemplate the probability of burying with her beloved uncle, all the dear and tender ties that bound them to each other. With no one to console her, and nothing on earth to screen her from the desolating blast of grief, the whole fabric of her worldly happiness seemed crumbling to dust. Her heart was like an exhausted receiver, and her spirit sank, yet no inducement could have withdrawn her for an hour from that scene of solemn, deep, and awful melancholy. Throughout the long, dreary hours of night, each of which seemed an eternity of anxious care, Marion felt too deeply impressed with the solemnity around for the indulgence of any violent emotion. Nothing is so silent as intense feeling! Stunned and stupified by the sudden affliction, a wild chaos of sorrow, fear, and amazement rushed through her young mind, filling her with agony, which tears could not relieve; but now was the time for that
  • 76.
    supernatural aid givenby Divine grace to the humble, believing Christian. In silent, speechless prayer, Marion found her first and only relief; then she felt that her heart was read, and her sorrows pitied, by One who has shared every human grief, carried every human sorrow, and to whom the suffering sinner never applies in vain. One morning, the grey light of dawn stole through a crevice of the shutters, while, in her lonely silence, Marion felt as if the whole world were in a trance, and not a sound was heard, but the slow ticking of the clock, reminding her that time and death are forever advancing. She sat watching every minute change of that beloved countenance shattered by sickness, and evidently sinking in decay, when Sir Arthur unexpectedly opened his eyes, which once more beamed with intelligence, as he fixed them with a look of touching mournfulness on Marion, and called her by name. That voice, which had so long been dear to her, now sounded strange and unnatural, being palsied by weakness, while the glassiness of the grave was in his eye; but Marion, forcibly subduing all appearance of emotion, stooped down, and, with a momentary gleam of hope, kissed his pale forehead. Marion! we have loved each other well, said he feebly, extending his hand to her. For your sake I would stay, old and weary as I am, but the far better will of God is otherwise. Before that clock strikes again, I shall be in a better world. Marion covered her face with her hands and attempted not to speak, for she saw that the sure hand of time, and the heavier hand of sorrow, had indeed done their work. It was but too evident that Sir Arthur would never see another night, for he was about to awaken in the mighty dawn of eternity, where no darkness ever would follow. The frail, old, worn-out tenement of his body, so full of infirmities, was now to enter its rest; his head, whitened with age and suffering, had been anointed with peace, and, having partaken
  • 77.
    with cheerful thankfulnessof the banquet of life, he was evidently willing to make way, that others might fill his place; not disgusted or dissatisfied with existence, but thankful that he had tasted better joys than those of earth, and desiring to enjoy them at last in never- ending perfection. A mysterious conviction is generally given to the dying, when their disease becomes mortal, but though nature shrank at first from the solemn change, religion supported the powerful mind of Sir Arthur, who added, in a tone of commanding calmness, while a beam of ineffable peace overspread his countenance, You are now my sole earthly care—as you are my only earthly comfort. It breaks my heart to leave my Marion worse than alone, while Patrick and Agnes remorsely pursue their own pleasure, careless how you are trampled down in their wild career. Dear uncle! whispered Marion, wishing to soothe him, you consigned me to the care of Richard Granville, and year after year, while we live, you shall be remembered by us both with the affection and gratitude of children to a parent. I did hope, my dear girl, that I should have lived to understand his conduct, and even now, while standing in the gloomy porch of death, it would cheer me to see him and dear Henry again. If Granville be the man I believe him, he will come immediately to see you now, and all will be satisfactorily explained—if not, the world is worse than I thought. If Richard is alive, he will come, dear uncle—but oh! what a meeting it would be, without you! Take comfort, dear Marion. Think of me often, but let it be with consolation. My long life seems but a span! May yours be blessed with every affection of this world—with every hope for eternity—and may your death-bed be attended by one as dear and affectionate as mine is. May your eyes be closed in the same undoubting faith, and may I be permitted to meet you on the very threshold of heaven,
  • 78.
    and in theaugust presence of Him, whom 'not having seen, we love, and in whom believing, we rejoice with joy unspeakable and full of glory.' With a face livid as death, Marion choked back her sobs and restrained her tears, while she listened to every faltering word Sir Arthur said, as if her life depended on hearing him. When he became silent from exhaustion, she attempted to whisper a few broken expressions of grief and affection in his ear. Unable, however, to think or speak under the weight of her sorrow, she might have been mistaken for a corpse, but for the look of living agony in her eye, while struggling with a sorrow which tears or lamentations could not have expressed, and could not have relieved. At length Sir Arthur's breathing became uncertain—his majestic chest heaved convulsively—a damp, cold dew broke out on his forehead—the heart which had beat with every kind and noble emotion, could beat no more—and, giving a last glance of fond affection at Marion, a grey, ashy hue stole over his features, and his countenance assumed that strange, peculiar aspect which is seen in death, and in death only. Marion saw it, and long afterwards that look was forever before her sight. Nothing in all the earth is so unutterly sublime as death. Strange and solemn was the mysterious horror, the inexplicable wonder, with which Marion, for the first time, witnessed the soul forsaking its earthly tabernacle. Day after day, when she returned to watch beside all that now remained of her earliest and kindest friend, while her heart seemed scorched and seared with grief, she gazed on the mortal form in ruins before her— its light extinguished—its tenant departed—its whole nature in a moment transformed—and, forgetting sometimes for a moment her own grief, her loneliness, her deep and fearful bereavements, she thought but of that purified spirit now emancipated into the regions of eternal glory, and almost longed for the period when she also might become as indifferent to things of time as the inanimate corpse beside her. Often, however, she tried, with an eye of faith, to
  • 79.
    look beyond theportals of the tomb, remembering that death is to a Christian, like the setting of the sun, for while lost to human sight, he still exists and shines with unfading glory and everlasting brightness. When Sir Arthur's remains were placed in the coffin, Marion felt as if the last link were severed between them. His better part had, indeed, already departed, but the cold image before her was still associated with all she had ever known of happiness or affection, yet, in the strong agony of her grief, when all seemed a gloomy chaos of solitary desolation, she felt consoled by reflecting that her own devoted care had assisted in smoothing his passage to the grave; and she could not but think how great must be the joys of another world, when such affliction as her's was not worthy to be compared with them. A wide horizon of sorrow seemed before her, long days of loneliness and longer nights of grief; while, though young in years, she already felt old in affliction, for a blight and a mildew were upon her spirit. Marion's sanguine mind and ardent feelings had nothing near her on which to rest, the whole energy of her being, for the time, seemed crushed and withered; the future appeared to stretch before her mind in a long vista of moving shadows, and the memory of past happiness, like gold in the hand of a drowning man, sank her only the deeper in grief. Her beloved uncle seemed still to be everywhere—yet she saw him not. In all the earth there was not a thought which did not pierce her, or a worldly hope which did not now bring an icy chilliness to her heart—for a dark cloud had fallen between her and all those whose affection once adorned her existence. It was now that Marion, like a tempest-tossed vessel, surrounded by darkness and fear, turned for direction and help to that steady and benignant light burning at a distance, which alone could direct her into a haven of rest. Her sorrow became gradually illuminated by hope and peace. She clung to every shattered wreck of happiness which remained, and sinking on her knees, she felt that no one
  • 80.
    could ever becompletely alone, or completely miserable, who rightly used the privilege of speaking her wishes in prayer to that great and holy Being, who is the father and the friend of all his earth-born children. Marion had long believed that the happiest life is that most conformed to the will of God—that grief arises from not believing whatever is appointed to be really best; and now she found in the Bible that comfort which is nowhere else to be gained. The deepest emotions of this world remain unseen and unknown to all around; for the strength of character which gives power to feel, gives power also to hide, and there is a modesty in real sensibility, which admits not of display; but Marion, cut off now from all the tenderest sympathies of life, became the more zealous and diligent in preparing for that hour when mourned and mourner lie together in repose. Oh! if belov'd ones from their hallow'd sphere, May witness warm affection's faithful tear, At this deep hour, they hear the mourner's sigh, And waft a blessing from their homes on high.
  • 81.
    CHAPTER XLII. At Florence,Clara Granville lingered and recovered, and lingered again, sleeping little, eating nothing, and patiently trying every remedy, though she herself was without hope of recovery, till at length, decorated in all the radiant coloring and bright beauty of consumption, she sank slowly but surely, evidently hastening to the grave, though still Mr. Granville, with the tenacity of affection, continued to hope, and still he told himself that she might, perhaps, yet be spared. Day after day he sat beside her couch, reading, conversing, and praying with her, while his brotherly attachment seemed to grow only the more engrossing and considerate the longer she needed his care; but it became evident to all around, that his cares and hopes on her account were drawing to a close, and that his sorrow must soon be without hope in a present world, though full of hope in a world to come. Letters now reached Mr. Granville, announcing that his long-pending law-suit had been at length finally decided in his favor, giving him an income more than equal to his utmost desires; but letters far more deeply interesting to his feelings still were missing. Often and anxiously had he watched for a single line from Marion, yet so well had Sir Patrick arranged the measures which, as her guardian, he persuaded himself it might be allowable to take, in order to intercept her correspondence, that not a single letter ever escaped the vigilance of his emissaries; and Mr. Granville, though he still cherished, as his best earthly treasure, the belief of Marion's attachment, felt so painfully perplexed respecting her, and so grieved for Clara, that the almost unexpected change in his circumstances appeared scarcely worth a thought, while a dense curtain of sorrow seemed gathered around his spirits.
  • 82.
    If the vitalspark of his own existence had been about to expire, Richard could scarcely have felt more deeply than now, beside the dying bed of his young and lovely sister, who took his hand in her own one day, while a fixed expression of tenderness and grief appeared in her speaking eyes, and there was a melting softness in her voice, when she said: My only reluctance to die, is, dear Richard, because I must leave you! This is sorrow; but our sorrow shall hereafter be turned into joy. When patience has had her perfect work, you, like myself, have a sure and certain hope of a better world, and, unlike me, you have a hope also for this life, which contains the best blessing left to man upon earth. Yes, Richard, you will soon have a loved and trusted companion, suited in every respect to yourself; and with her, I trust, you may enjoy a long course of usefulness and of joy, after I am no more. Mr. Granville kissed his sister's forehead with deep and solemn affection, while his cheek became pale and his lip quivered; but his heart was too full to reply, and Clara proceeded: We have saved ourselves much unnecessary anxiety by placing a firm and well-founded confidence in dear Marion. Let that remain unshaken, Richard, till you meet, said Clara, fixing her large, mournful eyes on him; and slowly closing them as she faintly added, Tell Marion I died without a doubt of her constancy and truth. And now, there is but one wish remaining to me in life, Richard—only one—— Clara hesitated, the hectic color deepened on her transparent cheek, her lip trembled, and she became silent, while Richard took her hand in his own, and listened with affectionate anxiety for what was to follow; but it came not. With a look of desolate grief Clara turned away her head and was silent, while Mr. Granville, using every term of affectionate endearment, entreated her not to let him suppose there was a wish of her heart unspoken, or a desire which he could
  • 83.
    grant unfulfilled. Aftera short struggle, during which he was alarmed by the greatness of her emotion, she seemed at length to have entirely conquered her feelings, and said in a perfectly calm, unimpassioned voice— A letter was conveyed to me last night—I know not how it came— from Sir Patrick. He has been some time in Florence; he sends every morning to inquire for me! I am told he even watches daily till the doctors come out, and asks how I am! True, dear Clara, and I feel for him deeply. Richard! added she, raising herself up with sudden energy, and clasping his arm, while her large, bright eyes became fixed on his, I wish to see Sir Patrick once again! to have a last conversation with him on this side of the eternal world. There is a sacred power in the words of a dying friend, and I would summon the whole faculties of my being, to bid him a last and solemn farewell. He has always listened to me. If I have any influence, let me use it now. Think what a blessed consciousness I yet might carry to the grave, if our unhappy attachment were no longer a source of misery to both, but of real and eternal advantage. Let me make a final effort of life and of affection, to leave in his heart a thought of immortality. Such a hope might almost hold back my spirit from the gates of death! Dear Richard, I shall rise for half an hour to-morrow, and then let me see him! It would destroy you, Clara! you are quite unfit for the effort; but give me a message. Say what you please; and, painful as it must be, I shall see Sir Patrick, personally. We can sympathise with each other now, as we never did before, and I shall deliver your very words. You are unfit now, Clara, for any agitation. Dear Richard! you never yet denied me anything! Do not now refuse my last—my very last request. Whatever be the faults of Sir Patrick, his attachment was disinterested and generous. I cannot die
  • 84.
    in peace withoutsaying that I am grateful—without, at least, endeavoring to convince him, for his happiness now, as well as hereafter, how true it is, that 'he sins against this life who slights the next.' It might be a work of usefulness and mercy, replied Mr. Granville, in a musing tone; and if there be a pleasure in life you can yet enjoy, dear Clara, I am not the person who could withhold it. That I know. In this world which has so long been my home, Richard, I have never lived a moment without being the happier for your affection, and it will be so for ever. I am now counting the last grains of my sand-glass as they fall, and ready to go alone through the portals of the tomb. Every sorrow is about to be eternally forgotten, every blessing to be eternally enjoyed. Most of my feelings and affections are already transferred to another and a better world; while I ought, as a dying Christian, to be like an eagle soaring to the sky, and seeing nothing but the sun, yet, Richard, the hope of serving one whom I loved only too well still lingers round my heart, and will not be repulsed. Say then, Richard, that we may meet;—tell him that, standing on the very brink of eternity, I feel as if, even in another world, it would increase my felicity to know, if permitted to look back on earthly scenes, that I had not left him without hope or consolation. I do not believe, Clara, that the invisible world is very distant; but only that it is hid by the grossness of our mortal bodies; and I do believe, my dear sister, that we may both, perhaps, yet see the influence of your prayers and of your last words upon one whom I most sincerely pity, said Mr. Granville, observing the mild, full, melancholy eyes of his sister fixed upon him, while gradually, as he spoke, her countenance became irradiated with peace. The ways of Providence are indeed wonderful! If Dunbar be willing to forget all that has ever been amiss between us both, I have forgotten it long
  • 85.
    ago. If hechoose it, we shall become friends, till Marion makes us brothers. Oh that I could live to see that day, and then close my eyes in peace; but it must not be! In a few hours I shall have shed my last tear, endured my last sorrow, and conquered my last enemy. Who would not be willing, then, to change time for eternity, the sufferings of earth for the joys of heaven, misery for happiness, and a dying life for immortality! A lovelier morning never had smiled on the glad earth, than that on which Clara Granville received the visit of Sir Patrick alone. On a couch near the window, into which the sun poured a flood of light and warmth, propped up by cushions, Clara, with an unearthly brightness glittering in her eye, and burning on her cheek, looked more like a celestial spirit than a creature of earthly mould; but what passed between them, during the long interview which ensued, no one could tell. Clara's features, when it was about to close, betrayed no agitation, but continued almost motionless for some time, while the tone of her voice became slow and languid. Gradually her words appeared fainter; her voice grew nearly inaudible; the color which had tinged her cheek died away; and a death-like paleness succeeded. Not a groan was heaved, nor a feature disturbed; but scarcely had Sir Patrick time hastily to summon Mr. Granville, and to support her in his arms, before her countenance became rigid as marble, and her ethereal spirit had mysteriously fled from its mortal dwelling. Loveliest of lovely things are they, On earth, that soonest pass away; The rose, that lives its little hour, Is prized beyond the sculptured flower. Ev'n love, long tried, and cherish'd long, Becomes more tender and more strong,
  • 86.
    At thought ofthat insatiate grave, From which its yearnings cannot save. Sir Patrick's grief and horror now became almost delirious, and he was tortured by a feeling of unutterable agony; yet still he seemed resolute to doubt the fatal truth, to hope against hope, to believe that by a miracle Clara might at length awaken from her seeming repose; but her hand grew cold within his own, and the glassy fixedness of her eye carried death to his heart. He felt and knew that all was over, yet he could not allow himself to credit the solemn event; till, at length, covering his face with his hands, he groaned aloud in all the anguish of a sorrow without hope or resignation. Mr. Granville, forgetful, apparently, of his own grief, tried now to impart consolation from that rich fund of sublime peace and everlasting hope which belongs, at such an hour, to the Christian; for, though his own feelings were lacerated and torn with a sorrow that seemed as sudden as if he had never till now expected it, still there was a balm for his wounded spirit, which soothed the first anguish of his sufferings, and would at last, he knew, bring him daily more abundant consolation. No affliction seems to come so directly from the hand of God as the death of those who have been so truly loved; and in contemplating the wide gulf which now divided him from Clara, the manly spirit of Mr. Granville was overpowered with grief. This seemed a moment too awful for vehement sorrow. He had watched the last struggle of existence in one with whom every thought and emotion were hitherto shared, and now, while her beloved and well-known features remained the same, all intercourse and all sympathy between them had at once been closed; and, in the hours of solemn contemplation which followed, Richard felt more than ever a desire to learn what is seen and felt when the gloomy curtain of life is withdrawn, and the glories of eternity are first revealed; but, checking the speculations of a vain curiosity, he opened the pages of holy inspiration, there to find an inexhaustible
  • 87.
    fund of sublimeand elevating comfort, convinced that, to have his affliction sanctified, was even better than to have it removed. The sympathy established between Sir Patrick and Mr. Granville now brought them daily together, when the young Baronet learned, in such society, to venerate and admire that holy faith, which as yet he could neither feel nor comprehend; and every hour he became more conscious of its happy effects on the mind and heart of Richard Granville, who seemed always ready to forget every selfish thought, when the glory of God or the good of others claimed his most arduous and zealous devotion; and even his grief for Clara, deep and agonizing as it was, found a vent in the most implicit attention to all her wishes, and especially to her injunctions respecting the restoration of his friendly intercourse with Sir Patrick. The darts of anguish fix not where the seat Of suff'ring hath been thoroughly fortified By acquiescence in the will supreme, For time and for eternity.
  • 88.
    CHAPTER XLIII. There issaid to be a stage in sorrow, after which an addition can be borne with apathy; but this the heart of Marion seemed never likely to reach. It is a natural source of comfort, however, in mourning over the loss of those we love, to find that they are appreciated and lamented by others; and many kind letters of condolence on the death of Sir Arthur reached the young mourner, from old companions and young acquaintances. Some were written with overdone and inflated expressions of sorrow, as if the writer had lost a parent of her own; and if the occasion had been less heartbreaking to herself, Marion might almost have smiled at their tone of exaggerated grief. Others wrote studied compositions, so beautifully got up, and with such skilfully turned periods, that the writer must have felt certain of Marion's Life and Correspondence being hereafter collected and published; while others concluded with Yours, in haste, as an evident apology for neither head nor heart being much enlisted on the occasion; but all were received with grateful interest, being more or less a proof of kind intentions, very soothing to the feelings of a solitary girl. Each letter, as it came, caused her a palpitation of hope, followed by a pang of disappointment; for every morning she arose with a confident hope that now Richard Granville must certainly write, and every evening closed in with an added weight of discouragement and sorrow; for now indeed the roses of life seemed all to have faded, and the thorns only to remain. As Shakspeare observes, every one can master a grief but he that has it; and among the many well-meaning but commonplace acquaintances who came to gossip over the sorrows of Marion, and to ascertain exactly how much Sir Arthur had left, there was not one to whom she could unveil her feelings. Each of her well-intentioned
  • 89.
    visitors said afew words in praise of Sir Arthur, enough to convince Marion that no one but herself could appreciate the hundredth part of his inestimable worth—a sentence or two then followed of pious reflection, obviously spoken with restraint, and picked up by rote from some volume of religious meditations, and the whole was generally concluded in a masterly manner, by repeating a few texts of Scripture, strung together from a concordance. There is a solemn dignity in real grief, beside which all commonplace or trifling consolations fall powerless and cold; but strangers in return for their contributions of sympathy and comfort, evidently expected from Marion an ostentatious display of affection, and were often not a little disappointed, at the pale, still, concentrated calmness of the lonely girl, who, subdued beneath the weight of her recent sorrow, received visitors only when she felt able to do so with composure, speaking to them with gentle, melancholy kindness, and evidently endeavoring to derive all the comfort she could from their society; yet often in the solitude which followed, did she feel inclined to agree with an author, who remarks, that la pitie n'est pas le plus due a celui qui pleure dans la solitude. Marion seemed to live in a dream, yet she gazed on the daylight and the people moving about on their errands of pleasure or business, till she felt that the whole was a sad reality. The common, every day routine of life seemed strange and unnatural, amidst the agony of her first sorrow, when the tomb had so recently closed over her earliest friend. She felt as if nature herself should have suspended her ordinary course, and as if the melancholy awe so impressed upon her own heart should extend to everything animate or inanimate around—as if the very sun itself should scarcely rise and shine as heretofore; and nothing appeared to Marion so strange, as that sameness visible in the outward world, contrasted with the mighty revolution in all her own inward feelings. Marion tried to take a lesson in cheerful resignation, from thinking sometimes of the many created by the same Almighty Father, and yet suffering far
  • 90.
    more than shehad ever done; and her eye fell one day on a blind beggar, seated near her window, shivering with cold, emaciated with hunger, solitary and deserted, shut out from the light of day, friendless, homeless, and desolate, with none to sympathize in his sorrows, or to cheer him by their affection. Yet, thought Marion, that miserable being finds an object to live for, and would not perhaps willingly die! God gives something to all his creatures; and who makes me to differ from the most wretched. But bodily wants are not the real sorrows of life! O no! The mind, when relieved from such abject cares, has more leisure to grieve over withered hopes and blighted affections; yet all trials, if rightly received, are but blessings in disguise. It is well if, by tasting such sorrows as mine— and they are many—I am taught to avoid the far greater and more permanent evils of futurity. In this world, we are suspended over the abyss of eternity, by a thread which grows more feeble every hour; and all events should be welcome which are ordained by infinite wisdom, to prepare me for that hour when my place on earth shall be vacant, and my place in eternity—in a ceaseless eternity, shall be filled. Time has wings, even when they move most heavily, and as day after day passed slowly onwards, Marion felt more and more astonished to hear nothing of Agnes, who had written but once, a very few days after her departure from home, in gay and almost triumphant spirits, boasting of the excessive attention she met with from all the party, of the splendor in which they travelled, of the admiration she had herself excited, and of several magnificent presents she had received from Lord Doncaster. In a postscript to this letter, she expressed a careless, patronizing hope, that poor, dear Sir Arthur was now convalescent; and as for anything but a recovery, she seemed no more to doubt it than if death had been altogether abolished. To Marion's surprise, when looking at the signature of Agnes, a broad line had been drawn through the name of Dunbar, and the whole was surrounded by a fantastic wreath of
  • 91.
    Welcome to ourwebsite – the perfect destination for book lovers and knowledge seekers. We believe that every book holds a new world, offering opportunities for learning, discovery, and personal growth. That’s why we are dedicated to bringing you a diverse collection of books, ranging from classic literature and specialized publications to self-development guides and children's books. More than just a book-buying platform, we strive to be a bridge connecting you with timeless cultural and intellectual values. With an elegant, user-friendly interface and a smart search system, you can quickly find the books that best suit your interests. Additionally, our special promotions and home delivery services help you save time and fully enjoy the joy of reading. Join us on a journey of knowledge exploration, passion nurturing, and personal growth every day! ebookbell.com