Service Oriented Java Business Integration 1st Ed. Edition Binildas A Christudas
Service Oriented Java Business Integration 1st Ed. Edition Binildas A Christudas
Service Oriented Java Business Integration 1st Ed. Edition Binildas A Christudas
Service Oriented Java Business Integration 1st Ed. Edition Binildas A Christudas
Service Oriented Java Business Integration 1st Ed. Edition Binildas A Christudas
1.
Service Oriented JavaBusiness Integration 1st
Ed. Edition Binildas A Christudas download
https://ebookgate.com/product/service-oriented-java-business-
integration-1st-ed-edition-binildas-a-christudas/
Get Instant Ebook Downloads – Browse at https://ebookgate.com
2.
Get Your DigitalFiles Instantly: PDF, ePub, MOBI and More
Quick Digital Downloads: PDF, ePub, MOBI and Other Formats
Service Oriented Architecture with Java Using SOA and
web services to build powerful Java applications First
Edition Christudas
https://ebookgate.com/product/service-oriented-architecture-with-
java-using-soa-and-web-services-to-build-powerful-java-
applications-first-edition-christudas/
Semantic Enterprise Application Integration for
Business Processes Service Oriented Frameworks Premier
Reference Source 1st Edition Gregoris Mentzas
https://ebookgate.com/product/semantic-enterprise-application-
integration-for-business-processes-service-oriented-frameworks-
premier-reference-source-1st-edition-gregoris-mentzas/
Collaborative business process engineering and global
organizations frameworks for service integration 1st
Edition Bhuvan Unhelkar
https://ebookgate.com/product/collaborative-business-process-
engineering-and-global-organizations-frameworks-for-service-
integration-1st-edition-bhuvan-unhelkar/
Service Oriented Architecture SOA Governance for the
Services Driven Enterprise 1st Edition Eric A. Marks
https://ebookgate.com/product/service-oriented-architecture-soa-
governance-for-the-services-driven-enterprise-1st-edition-eric-a-
marks/
3.
Microsoft Exchange Server2007 Infrastructure Design A
Service Oriented Approach 1st Edition David W. Tschanz
https://ebookgate.com/product/microsoft-exchange-
server-2007-infrastructure-design-a-service-oriented-
approach-1st-edition-david-w-tschanz/
Semantic Service Integration for Smart Grids 1st
Edition S. Rohjans
https://ebookgate.com/product/semantic-service-integration-for-
smart-grids-1st-edition-s-rohjans/
Applied SOA Service Oriented Architecture and Design
Strategies 1st Edition Michael Rosen
https://ebookgate.com/product/applied-soa-service-oriented-
architecture-and-design-strategies-1st-edition-michael-rosen/
Business Success Through Service Excellence 1st Edition
Moira Clark
https://ebookgate.com/product/business-success-through-service-
excellence-1st-edition-moira-clark/
Computer telephony integration 2nd ed Edition William
A. Yarberry Jr.
https://ebookgate.com/product/computer-telephony-integration-2nd-
ed-edition-william-a-yarberry-jr/
5.
Service Oriented JavaBusiness
Integration
Enterprise Service Bus integration solutions for
Java developers
Binildas C. A.
BIRMINGHAM - MUMBAI
Credits
Author
Binildas C. A.
Reviewers
RajeshR V
Rajesh Warrier
Acquisition Editor
Bansari Barot
Development Editor
Ved Prakash Jha
Technical Editor
Della Pradeep
Editorial Team Leader
Mithil Kulkarni
Project Manager
Abhijeet Deobhakta
Project Coordinator
Aboli Mendhe
Indexers
Hemangini Bari
Monica Ajmera
Proofreader
Angie Butcher
Production Coordinator
Shantanu Zagade
Aparna Bhagat
Cover work
Shantanu Zagade
8.
About the Author
BinildasC. A. provides Technical Architecture consultancy for IT solutions.
He has over 13 years of IT experience, mostly in Microsoft and Sun technologies.
Distributed Computing and Service Oriented Integration are his mainstream skills,
with extensive hands-on experience in Java and C#.NET programming. Binil
holds a BTech. degree in Mechanical Engineering from College of Engineering,
Trivandrum (www.cet.ac.in) and an MBA in Systems Management from Institute
of Management, Kerala (www.imk.ac.in). A well-known and a highly soughtafter
thought leader, Binil has designed and built many highly scalable middle-tier and
integration solutions for several top-notch clients including Fortune 500 companies.
He has been previously employed by multiple IT consulting firms including IBS
Software Services (www.ibsplc.com) and Tata Consultancy Services (www.tcs.com)
and currently works for Infosys Technologies (www.infosys.com) as a Principal
Architect where he heads the J2EE Architects group servicing Communications
Service Provider clients.
Binil is a Sun Certified Programmer (SCJP), Developer (SCJD), Business Component
Developer (SCBCD) and Enterprise Architect (SCEA), Microsoft Certified
Professional (MCP) and Open Group (TOGAF8) Certified Enterprise Architecture
Practitioner. He is also a Licensed Zapthink Architect (LZA) in SOA. Besides
Technical Architecture Binil also practices Enterprise Architecture.
When not in software, Binil spends time with wife Sowmya & daughter Ann in
'God's Own Country', Kerala (www.en.wikipedia.org/wiki/Kerala). Binil does
long distance running and is a national medalist in Power Lifting. You may contact
Binil at biniljava@yahoo.co.in or binil_christudas@infosys.com.
9.
Acknowledgement
First and Foremost,I would thank God who has always showered his choicest
blessings on me. I thank Him for all that he has done for me.
I would like to thank PACKT and everyone I worked with—Priyanka Baruah,
Bansari Barot, Patricia Weir, Aboli Mendhe, Bhushan Pangaonkar, Ved Prakash Jha,
Della Pradeep and others. They worked very hard with the aggressive schedule I
proposed on this book, and I truly do appreciate their contributions.
Next, I'd like to thank the Technical Reviewers of our book, Rajesh R. V. and Rajesh
R. Warrier. Without them, you wouldn't see the text as it appears here. Thank you
for your thorough review of the scripts and testing of the code. Your reviews were
very objective in pointing out issues and helping me to come up with the even
better chapters.
This book would have never been possible if were it not for the excellent colleagues
at IBS (other than the reviewers) whom I have worked with and learned from. The
most important of them are Prasanth G Nair, Shyam Sankar S, Sherry CK, Jayan P
and Amritha Mathew M. Thanks are due to VK Mathews for providing all of us the
opportunity. I would also like to thank Rajasekhar C. and Ajmal Khan who provided
me the right challenges at the right time.
Special thanks are due to Dr. Srinivas Padmanabhuni, Principal Researcher, Web
Services/SOA Centre of Excellence, Software Engineering and Technology Labs,
Infosys for his guidance and help.
I would like to thank my wife and best friend Sowmya for being a constant source
of inspiration in my life. Also my sweet little daughter Ann, I remember all those
moments when you were so desperate to play with me and to go out for 'dinner'
with pappa and amma, but I could not look beyond my laptop screen. Both of you
are my angels, thanks for everything, especially for being in my life.
10.
A massive thanksmust go to my Mom and Dad—Azhakamma and
Christudas—who have supported their wayward son through good and lean
times, and have given everything and asked for nothing. I thank the rest of my
family for their support and friendship— my sister Binitha and family, my wife's
mother, Pamala, and father Hubert for their unconditional encouragement and love
in helping me find the energy to complete this book.
I would also like to thank Ramavarma R for supporting me through his
consultancy, MacJavaB.
There were many others who played their part too. Most important of them are
the creators of the frameworks that have inspired me to write this book. Thank
you for the JBI specification and special thanks to the ServiceMix developer and
user community.
Last, it's necessary to thank you, the reader, for choosing to buy this book.
I understand that you have a specific intention in choosing to read this book and I
hope I take only the minimum required time from your busy schedules to serve
your requirements.
11.
About the Reviewers
RajeshR V received his Computer Engineering degree from the University of
Cochin, India. He joined the JEE community during the early days of EJB (1.0) and
fully dedicated his time in core technical activities in and around Java, JEE. During
the course as a solution architect, he has worked on many large scale mission critical
projects, including the New Generation Passenger Reservation System (400+ Man
Years) and Next Generation Cargo Reservation System (300+ Man Years), in the
Airline domain. Rajesh is also Sun Certified Java Enterprise Architect and BEA
Certified Weblogic Administrator.
Rajesh is currently working with Emirates Airlines IT Division based in Dubai and
his work is mainly in Consulting, Application Framework development, Technology
Evaluations and SOA related topics.
All my thanks goes to my wife Saritha for supporting me and loving
me even though I booked a lot of personal time to review this book.
Rajesh Warrier, currently working as one of the lead system architects in Emirates
Group IT, has around 10 years experience in the industry working with companies
like Sun Microsystems. He has been responsible for architecting and designing
many mission critical enterprise applications using cutting edge technologies. He is
currently working as an architect and mentor for the new generation cargo system
for the emirates airlines, developed completely using JEE.
13.
Table of Contents
Preface1
Chapter 1: Why Enterprise Service Bus 7
Boundary-Less Organization 8
Multiple Systems 8
No Canonical Data Format 8
Autonomous, but Federated 9
Intranet versus Internet 10
Trading Partners 10
Integration 11
Enterprise Application Integration 12
Integration Architectures 12
Point-to-Point Solution 13
Hub-and-Spoke Solution 13
Enterprise Message Bus Integration 15
Enterprise Service Bus Integration 16
Enterprise Service Bus versus Message Bus 17
Similarities and Differences 17
Maturity and Industry Adoption 19
Making the Business Case for ESB 20
How many Channels 20
Volatile Interfaces 22
New Systems Introducing Data Redundancy 22
Service Reuse 23
System Management and Monitoring 23
Enterprise Service Bus 23
Service in ESB 23
Abstraction beyond Interface 24
Service Aggregation 25
Service Enablement 26
Service Consolidation 26
14.
Table of Contents
[ii ]
Service Sharing 27
Linked Services 28
Virtualization of Services 29
Services Fabric 30
Summary 30
Chapter 2: Java Business Integration 31
SOA—the Motto 31
Why We Need SOA 32
What is SOA? 32
SOA and Web Services 33
Service Oriented Integration (SOI) 36
JBI in J2EE—How they Relate 36
Servlets, Portlets, EJB, JCA, and so on 37
JBI and JCA—Competing or Complementing 37
JBI—a New Standard 38
JBI in Detail 39
JSR 208 39
JBI Nomenclature 40
Provider—Consumer Contract 42
Detached Message Exchange 44
Provider—Consumer Role 45
Message Exchange 47
Service Invocation 47
Message Exchange Patterns (MEP) 47
In-Only MEP 48
Robust In-Only MEP 48
In-Out MEP 50
In-Optional-Out MEP 52
ESB—Will it Solve all Our Pain Points 55
Summary 56
Chapter 3: JBI Container—ServiceMix 57
ServiceMix—Under the Hood 58
Salient Features 58
ServiceMix Architecture 58
Architecture Diagram 58
Normalized Message Router Flows 59
Other ESBs 63
Mule 63
Celtix 63
Iona Artix 64
15.
Table of Contents
[iii ]
PEtALS 64
ChainBuilder 64
Installing ServiceMix 65
Hardware Requirements 65
OS Requirements 65
Run-time Environment 65
Installing ServiceMix in Windows 66
Installing ServiceMix in Unix 67
Configuring ServiceMix 67
Starting ServiceMix 67
Stopping ServiceMix 67
Resolving classpath Issues 67
ServiceMix Components—a Synopsis 68
Standard JBI Components 68
Lightweight JBI Components 69
Your First JBI Sample—Binding an External HTTP Service 70
Servlet-based HTTP Service 71
Configure the HTTP Service in ServiceMix 74
Run ServiceMix Basic JBI Container 76
Run a Client against ServiceMix 78
What Just Happened in ServiceMix 78
Spring XML Configuration for ServiceMix 79
Summary 81
Chapter 4: Binding—The Conventional Way 83
Binding—What it Means 83
Binding 84
Endpoints 84
Apache SOAP Binding 84
A Word about Apache SOAP 85
Apache SOAP Format and Transports 85
RPC and Message Oriented 86
Binding Services 86
Sample Bind a Stateless EJB Service to Apache SOAP 88
Sample Scenario 88
Code Listing 89
Running the Sample 91
Deploying the EJB 91
Bind EJB to SOAP 92
Run the Client 93
What Just Happened 94
How the Sample Relates to ServiceMix 96
16.
Table of Contents
[iv ]
Summary 97
Chapter 5: Some XFire Binding Tools 99
Binding in XFire 100
XFire Transports 100
JSR181 and XFire 101
Web Service Using XFireConfigurableServlet 101
Sample Scenario 101
Code Listing 102
Running the Sample 104
Web Service using XFire Spring XFireExporter 106
Sample Scenario 106
Code Listing 106
Running the Sample 109
Web Service Using XFire Spring Jsr181 Handler 109
Sample Scenario 109
Code Listing 110
Running the Sample 113
XFire Export and Bind EJB 113
Sample Scenario 114
Code Listing 115
Running the Sample 119
XFire for Lightweight Integration 120
Summary 121
Chapter 6: JBI Packaging and Deployment 123
Packaging in ServiceMix 124
Installation Packaging 124
Service Assembly Packaging 125
Service Unit Packaging 126
Deployment in ServiceMix 126
Standard and JBI compliant 126
Lightweight 127
Packaging and Deployment Sample 127
Phase One—Component Development 128
Phase Two—Component Packaging 129
Running the Packaging and Deployment Sample 132
Summary 134
Chapter 7: Developing JBI Components 135
Need for Custom JBI Components 135
ServiceMix Component Helper Classes 136
MessageExchangeListener 137
17.
Table of Contents
[ ]
TransformComponentSupport 137
Create, Deploy, and Run JBI Component 140
Code HttpInterceptor Component 140
Configure HttpInterceptor Component 141
Package HttpInterceptor Component 142
Deploy HttpInterceptor Component 143
Build and Run the Sample 144
Summary 145
Chapter 8: Binding EJB in a JBI Container 147
Component versus Services 147
Coexisting EJB Components with Services 148
Indiscrimination at Consumer Perspective 148
Binding EJB Sample 149
Step One—Define and Deploy the EJB Service 149
Step Two—Bind EJB to ServiceMix 150
Step Three—Deploy and Invoke EJB Binding in ServiceMix 155
Step Four—Access WSDL and Generate Axis-based
Stubs to Access EJB Outside Firewall 156
Reconciling EJB Resources 160
Summary 160
Chapter 9: POJO Binding Using JSR181 161
POJO 161
What are POJOs 161
Comparing POJO with other Components 162
ServiceMix servicemix-jsr181 162
JSR 181 162
servicemix-jsr181 162
servicemix-jsr181 Deployment 163
servicemix-jsr181 Endpoint 164
POJO Binding Sample 164
Sample Use Case 164
POJO Code Listing 166
XBean-based POJO Binding 166
Deployment Configuration 167
Deploying and Running the Sample 169
Access WSDL and Generate Axis-based Stubs to
Access POJO Remotely 169
Accessing JBI Bus Sample 173
Sample Use Case for Accessing JBI Bus 175
Sample Code Listing 177
18.
Table of Contents
[vi ]
Build, Deploy, and Run the Sample 179
Summary 179
Chapter 10: Bind Web Services in
ESB—Web Services Gateway 181
Web Services 181
Binding Web Services 182
Why Another Indirection? 182
HTTP 182
ServiceMix's servicemix-http 183
servicemix-http in Detail 183
Consumer and Provider Roles 184
servicemix-http XBean Configuration 185
servicemix-http Lightweight Configuration 188
Web Service Binding Sample 189
Sample Use Case 189
Deploy the Web Service 190
XBean-based servicemix-http Binding 193
Deploying and Running the Sample 193
Access WSDL and Generate Axis Stubs to Access the Web Service
Remotely 194
Summary 198
Chapter 11: Access Web Services Using the JMS Channel 199
JMS 199
Web Service and JMS 200
Specifications for Web Service Reliable Messaging 200
SOAP over HTTP versus SOAP over JMS 201
JMS in ServiceMix 203
Servicemix-jms 203
Consumer and Provider Roles 204
servicemix-jms XBean Configuration 204
servicemix-jms Lightweight Configuration 206
Protocol Bridge 207
Web Service in the JMS Channel Binding Sample 208
ServiceMix Component Architecture for the JMS Web Service 209
Deploy the Web Service 210
XBean-based servicemix-jms Binding 211
XBean-based servicemix-eip Pipeline Bridge 212
XBean-based servicemix-http Provider Destination 212
Deploying the Sample and Starting ServiceMix 213
Test Web Service Using JMS Channel 214
19.
Table of Contents
[vii ]
Summary 219
Chapter 12: Java XML Binding using XStream 221
Java XML Binding 222
JAXB 223
XStream 223
ServiceMix and XStream 225
XStream in a Normalized Message Router Sample 226
Sample Use Case 226
Code HTTPClient 228
Unmarshalling to Transfer Objects 228
HttpInterceptor Component 230
XStreamInspector Component 232
Configure Interceptor and Inspector Components 232
Package Interceptor and Inspector Components 234
Deploy Interceptor and Inspector Components 234
Build and Run the Sample 235
Summary 236
Chapter 13: JBI Proxy 237
Proxy—A Primer 238
Proxy Design Pattern 238
JDK Proxy Class 239
Sample JDK Proxy Class 240
ServiceMix JBI Proxy 243
JBI Proxy Sample Implementing Compatible Interface 244
Proxy Code Listing 245
XBean-based JBI Proxy Binding 246
Deployment Configuration 247
Deploying and Running the Sample 247
JBI Proxy Sample implementing In-Compatible interface 248
Proxy Code Listing 248
XBean-based JBI Proxy Binding 250
Deployment Configuration 251
Deploying and Running the Sample 251
Invoke External Web Service from the ServiceMix Sample 252
Web Service Code Listing 252
Axis Generated Client Stubs 253
XBean-based JBI Proxy Binding 256
Deployment Configuration 258
Deploying and Running the Sample 258
Proxy and WSDL Generation 259
20.
Table of Contents
[viii ]
Summary 260
Chapter 14: Web Service Versioning 261
Service Versioning—A Means to SOA 261
Services are Autonomous 262
Change is the Only Constant Thing 262
All Purpose Interfaces 262
SOA Versioning—Don't Touch the Anti-Pattern 263
Types can Inherit—Why not My Schemas 265
If Not Versions, Then What 265
Strategy to Version Web Service 265
Which Level to Version 266
Version Control in a Schema 266
targetNamespace for WSDL 267
Version Parameter 267
Web Service Versioning Approaches 268
Covenant 268
Multiple Endpoint Addresses 269
Web Service Versioning Sample using ESB 270
Sample Use Case 270
Configure Components in ESB 274
Deploy and Run the Sample 285
Web Service Versioning Operational Perspective 287
Summary 287
Chapter 15: Enterprise Integration Patterns in ESB 289
Enterprise Integration Patterns 289
What are EAI Patterns? 290
EAI Patterns Book and Site 290
ServiceMix EAI Patterns 291
Why ServiceMix for EAI Patterns? 291
ServiceMix EAI Patterns Configuration 293
EAI Patterns—Code and Run Samples in ESB 294
Content-based Router 294
Notation 294
Explanation 295
Illustrative Design 295
Sample Use Case 296
Sample Code and Configuration 297
Deploy and Run the Sample 301
Content Enricher 303
Notation 303
Explanation 303
21.
Table of Contents
[ix ]
Illustrative Design 303
Sample Use Case 304
Sample code and configuration 305
Deploy and Run the Sample 307
XPath Splitter 308
Notation 309
Explanation 309
Illustrative Design 309
Sample Use Case 310
Sample Code and Configuration 311
Deploy and Run the Sample 312
Static Recipient List 313
Notation 314
Explanation 314
Illustrative Design 314
Sample Use Case 315
Sample Code and Configuration 316
Deploy and Run the Sample 318
Wiretap 319
Notation 319
Explanation 320
Illustrative Design 320
Sample Use Case 320
Sample Code and Configuration 321
Deploy and Run the Sample 323
Message Filter 323
Notation 324
Explanation 324
Illustrative Design 324
Sample Use Case 325
Sample Code and Configuration 326
Deploy and Run the Sample 328
Split Aggregator 329
Notation 329
Explanation 329
Illustrative Design 330
Sample Use Case 330
Sample Code and Configuration 331
Deploy and Run the Sample 332
Pipeline 334
Notation 334
Explanation 335
Illustrative Design 335
Sample Use Case 336
Sample Code and Configuration 337
Deploy and Run the Sample 339
Static Routing Slip 339
Notation 340
22.
Table of Contents
[ ]
Explanation 340
Illustrative Design 340
Sample Use Case 341
Sample Code and Configuration 342
Deploy and Run the Sample 344
Summary 345
Chapter 16: Sample Service Aggregation 347
Provision Service Order—Business Integration Sample 347
Solution Architecture 348
JBI-based ESB Component Architecture 350
Understanding the Message Exchange 351
Deploying and Running the Sample 365
Summary 366
Chapter 17: Transactions, Security, Clustering, and JMX 367
Cross Cutting Concerns—Support Inside ServiceMix 368
Transactions 368
Security 371
Clustering 373
JMX 377
Sample Demonstrating Transaction 377
Sample Use Case 378
Configure Transaction in ServiceMix 379
Deploy and Run the Sample 382
Sample demonstrating Security 383
Sample Use Case 384
Configure Basic Authorization in servicemix-http 384
Deploy and Run the Sample 387
Sample Demonstrating Clustering 388
Sample Use Case 389
Configure ServiceMix Cluster 391
Deploy and run the sample 395
Sample demonstrating JMX 397
Enable JMX in ServiceMix Application 397
Initialize JMX Console—MC4J 398
Retrieve WSDL through JMX 400
Summary 402
Index 403
23.
Preface
You're all inthe business of software development. Some of you are architects and
developers while few others are technology managers and executives. For many of
you, ESB is encroaching and JBI is still an unknown—a risk previously avoided but
now found to be inescapable. Let us tame these buzzwords in the context of SOA
and Integration.
While you do the day to day programming for solving business problems, you will
be generating business code as well as business integration code. The traditional
Java/J2EE APIs provide you with enough tools and frameworks to do the business
coding. The business code will help you to implement a business service such as
creating orders or finding products. On the contrary, business integration code
wires together multiple applications and systems to provide seamless information
flow. It deals with patterns of information exchange across systems and services,
among other things. This is where the new Java API for Integration—Java Business
Integration (JBI) seeks attention.
JBI provides a collaboration framework which has standard interfaces for integration
components and protocols to plug into, thus allowing the assembly of Service
Oriented Integration (SOI) frameworks following the Enterprise Service Bus (ESB)
pattern. JBI is based on JSR 208, which is an extension of Java 2 Enterprise Edition
(J2EE). The book first discusses the various integration approaches available and
introduces ESB, which is a new architectural pattern which can facilitate integrating
services. In doing so, we also introduce ServiceMix, an Apache Open Source
Java ESB. Thus for each of the subsequent chapters, we limit our discussion to a
major concern which we can address using ESB and then also showcase this with
samples which you can run using ServiceMix. If you are a person with a non-Java
background, the book still benefits you since most of the integration wiring happens
in XML configuration files.
24.
Preface
[ ]
Theaim of this book is to prepare an architect or developer for building integration
solutions using ESB. To that end, this book will take a practical approach,
emphasizing how to get things done in ServiceMix with code. On occasions, we
will delve into the theoretical aspects of ESB, and such discussions will always be
supplemented with enough running samples. The book, thus, attempts to distill
some of the knowledge that has emerged over the last decade in the realm of Java
Integration. Quite different from the other books in the related topics, you don't need
a 4GB RAM or some heavy, vendor specific IDE/Workshops to run the samples.
Instead, get set with the latest JDK and a text editor and few other lightweight
frameworks including Tomcat and you are ready to go. Enough about the hype,
supplement with what you've heard with some substance and code.
Happy Reading!
What This Book Covers
Chapter 1 begins with a quick tour on Enterprise Integration and the associated
issues so that you can better understand the problem which we are trying to
solve, rather than following a solution for an unknown problem. We also introduce
Enterprise Service Bus (ESB) architecture and compare and contrast that with other
integration architectures.
Chapter 2 introduces Java Business Integration (JBI) and inspects the need for another
standard for Business Integration, and also looks into the details on what this
standard is all about.
Chapter 3 introduces ServiceMix, which is an open source ESB platform in the Java
programming language, built from the ground up with JBI APIs and principles. It
runs through a few other ESB products also.
Chapter 4 looks at how we have been binding services locally or remotely even
before the ESB became popular. The chapter will demonstrate how tunneling using
conventional J2EE tools will help to expose even technology-specific API services.
An example of such a service is an EJB service to be exposed through firewalls over
HTTP so that the service becomes technology agonistic.
Chapter 5 introduces XFire, which is a new generation Java SOAP framework to
easily expose web services. Here we demonstrate the integration capabilities of the
XFire. Then we can do integration using XFire within the JBI Architecture also.
Chapter 6 teaches you JBI packaging and deployment. After going through this
chapter the reader will be able to build, package, and deploy integration artifacts as
standard JBI packages into the JBI container.
25.
Preface
[ ]
Chapter7 teachs you how to create your own components and deploy them onto the
JBI container. This chapter visits the core API from the ServiceMix as well as from
the JBI specification which will function as useful helper classes using which you can
develop integration components quickly.
Chapter 8 shows you how to bind Enterprise Java Beans components to the ESB. EJB
is the Distributed Component paradigm in the Java-J2EE world and the industry has
a lot invested in this technology. Coexisting services with those components will help
you to reuse those existing investments so that we can continue building new systems
based on higher levels of SOA maturity.
Chapter 9 shows POJO Binding using JSR181 to the ESB. POJO components can be
easily exposed as WSDL-compliant services to the JBI bus.
Chapter 10 illustrates how to bind the web services to the ServiceMix ESB, thus
creating a web services gateway at the ESB layer.
Chapter 11 looks at how Java Message Service (JMS), which is a platform dependent
messaging technology, can increase the QOS features of web services by making web
services accessible through the JMS channel.
Chapter 12 introduces Java XML binding and XStream, which is a simple open
source library to serialize the Java objects to XML and back again. We will show the
XStream integration with ESB demonstrating streaming of data across the bus.
Chapter 13 visits the JDK Proxy classes and then explains the JBI Proxy in detail with
examples. We show a practical use of the JBI Proxy—Proxying the external web
services in the JBI bus.
Chapter 14 explains versioning in the SOA context and explains various strategies
and approaches to versioning services. It also explains and demonstrates a
versioning sample leveraging the targetNamespace attribute. Versioning services,
especially versioning of web services, is a topic of heated discussion in many forums
and sites.
Chapter 15 explains that the EAI patterns are nuggets of advice made out of
aggregating basic Message Exchange Pattern elements to solve frequently
recurring integration problems. We can look at EAI patterns as design patterns for
solving integration problems. This chapter will demonstrate many of the common
EAI patterns.
Chapter 16 looks into a sample use case. One of the useful applications of ESB is
to provide a Services Workbench wherein which we can use various integration
patterns available to aggregate services to carry out the business processes.
26.
Preface
[ ]
Chapter17 visits a few selected QOS features such as Transactions, Security,
Clustering, and Management which can impact the programming and deployment
aspects using ESB.
What You Need for This Book
To install and run most of the samples mentioned in this book all you need is
the following:
Latest Java SDK (JDK) installed in your machine.
Apache Open Source Enterprise Service Bus—ServiceMix.
Apache Ant build tool.
A simple text editor, like Textpad.
Any other software required is mentioned which is downloadable free from
the net.
Who is This Book for
This book is aimed at Java developers and integration architects who want to become
proficient with Java Business Integration (JBI) standard. They are expected to have
some experience with Java and to have developed and deployed applications in
the past, but need no previous knowledge of JBI. The book can also be useful to
anyone who has been struggling to understand ESB and how it differs from other
architectures and to understand its position in SOA.
This book primarily targets IT professionals in the field of SOA and Integration
solutions—in other words, intermediate to advanced users. You are likely to find the
book useful if you fall into any of the following categories:
A programmer, designer or architect in Java who wants to learn and code in
JBI or ESB.
A programmer, designer or architect who doesn't normally code in Java can
still benefit from this book, since we 'assemble integration components' using
XML with little to no Java code.
An IT Manager or an Officer who knows well about SOA or SOI but want
to see something in code (you can adorn your flashy presentations with some
live code too).
•
•
•
•
•
•
•
•
27.
Preface
[ ]
Conventions
Inthis 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: For example,
inside the component tag you can configure properties on the component.
A block of code will be set as follows:
target name=run
java classname=HttpInOutClient fork=yes failonerror=true
classpath refid=classpath/
arg value=http://localhost:8912/EsbServlet/hello//
arg value=HttpSoapRequest.xml/
/java
/target
Any command-line input and output is written as follows:
cd ch03Servlet
ant
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:
The components being initialized, in our case, include trace, timer, httpGetData,
and httpReceiver.
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.
28.
Preface
[ ]
Tosend 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/4404_Code.zip, to directly downlad
the example code.
The downloadable files contain instructions on how to use them.
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 are 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.
29.
Why Enterprise ServiceBus
Today's enterprise is not confined to the physical boundaries of an organization.
Open systems and an open IT infrastructure strives to provide interoperability not
only between platforms, runtimes, and languages, but also across enterprises. When
our concerns shift from networked systems to networked enterprises, a whole lot
of opportunities open up to interact with enterprise applications. Whether it is for
trading partners to collaborate through their back-end systems, or for multichannel
deployments where consumers can use a whole lot of user agents like web and
mobile handsets, the opportunities are endless. This also introduces the issues and
concerns to be addressed by network, integration, and application architects. Today,
companies that have been built through mergers or rapid expansions have Line of
Businesses (LOB) and systems within a single enterprise that were not intended to
interact together. More often than not these interactions fail and are discredited.
Let's begin with a quick tour of enterprise integration and the associated issues so
that we can better understand the problem which we are trying to solve, rather than
follow a solution for an unknown problem. At the end of this chapter, you should be
in a position to identify what we are trying to aim with this book. We also introduce
Enterprise Service Bus (ESB) architecture, and compare and contrast it with other
integration architectures. Then we can better understand how Java Business
Integration (JBI) helps us to define ESB-based solutions for integration problems.
In this chapter we will cover the following:
Problems faced by today's enterprises
Enterprise Application Integration (EAI)
Different integration architectures
ESB
Compare and contrast service bus and message bus
Need for an ESB-based architecture
•
•
•
•
•
•
30.
Why Enterprise ServiceBus
[ ]
Boundary-Less Organization
Jack Welch, of General Electric (GE), invented the boundary-less organization.
Meaning that, organizations should not only be boundary-less, but should also
be made permeable. Integrated information and integrated access to integrated
information are two key features that any enterprise should aim for, in order to
improve their organizational business processes. Boundary-less doesn't mean that
organization has no boundaries; it means that there's a smooth and efficient flow of
information across boundaries. While enterprise portals and web services give a new
face for this emerging paradigm, the skeleton of this open enterprise is provided
by an open IT infrastructure. The flesh is provided by emerging trends in Enterprise
Application Integration (EAI) practice.
Let us briefly visit a few selected issues faced by today's enterprises.
Multiple Systems
In a home business or in small scale ventures, we start up with systems and
applications in silos which cater to the entire setup. When the business grows,
we add more verticals, which are functionally separated entities within the same
organization. It goes without saying that, each of these verticals or LOB will have
their own systems. People ask why they have different systems. The answer is
because they are doing functionally different operations in an enterprise and hence
they need systems carrying out different functionality for them. For example, an HR
system will manage and maintain employee related data whereas the marketing
relations will use Customer Relationship Management (CRM) systems. These
systems may not be interconnected and hence impede information flow across LOBs.
Adding to this, each LOB will have their own budgeting and cost constraints which
determine how often systems are upgraded or introduced.
No Canonical Data Format
Multiple LOBs will have their own systems, and hence their own data schemas, and
a way of accessing the data. This leads to duplication of data, which in turn leads to
multiple services providing views for the same entity in different ways.
Let's consider the example shown in the following figure. There is one LOB system,
Product Information System, which will keep track of customers who have registered
their interest for a particular product or service. Another LOB system, Event
Registration System, will provide membership management tools to customers, for
a sales discount program. Sales Information System will have to track all customers
who have registered their interest for any upcoming products or services. Thus, we
can see there is no unified view of the Customer entity at the enterprise-level. Each
31.
Chapter 1
[ ]
LOB will have its own systems and their own view of Customer. Some will
have more attributes for the Customer, while others a few. Now the question is
which system owns the Customer entity? Rather, how do we address the data
stewardship issue(This is represented in the figure using the symbols ? and ?) ?
Data stewardship roles are common when organizations attempt to
exchange data, precisely and consistently, between computer systems,
and reuse data-related resources where the steward is responsible for
maintaining a data element in a metadata registry.
Autonomous, but Federated
Now the question is how long can these systems remain isolated? Rather, can we
bring all these systems under a central, single point of control? The fact is, systems
cannot remain isolated, and also they cannot be controlled centrally. This is because
every system needs data from every (or most) other systems. Can we then integrate
everything together into a single big system so that we don't have the problem of
integration at all? The question seems tempting, but this is analogous to attempting
to boil sea water.
Different departments or verticals within the same organization need autonomy and
so do their systems. Without the required level of autonomy, there is no freedom
which will hinder innovation. Constant innovation is the key to success, in any walk
of life. So, departments and their systems need to be autonomous. But, since they
require each other's data, they need to integrate. This leads to the necessity for a farm
of autonomous systems, which are all federated to the required level to facilitate
information flow.
32.
Why Enterprise ServiceBus
[ 10 ]
The following figure represents systems that are autonomous, but federated to
facilitate information flow:
Intranet versus Internet
Integrating different functional departments within an organization is not a big
hurdle, since everything is under the control of the organization. But the picture
changes the moment the organization grows beyond a certain limit. Twenty first
century organizations are growing beyond a single location; many of them are truly
global organizations. They have operations around the globe, in multiple countries,
with multiple legal, technical, and operational environments. The good news is
that we have technologies like Internet, Wide Area Networks, and Virtual Private
Networks for connectivity. This means global organizations will have their systems
federated across the globe. All these systems will evolve due to constant innovation
and business changes. They have to integrate across the firewall, and not every
protocol and format can be easily traversed across the firewall.
Trading Partners
Organizations conduct business with other organizations. An online retailer's
system has to partner with its wholesaler's inventory systems. These systems are not
federated in any manner due to the fact that they belong to multiple organizations.
There exists no federation due to the competitive nature between organizations too.
But they have to collaborate; otherwise there is no business at all. So, information
has to flow across organizational systems in the Internet. This is what we mean by a
permeable organization boundary which allows for constant information exchange
33.
Chapter 1
[ 11]
on 24 X 7 bases, with adequate Quality of Service (QOS) features. Thus the necessity
is to extend the enterprise over the edge (firewall), and this activity has to happen
based on pre-plans and not as an afterthought.
The following figure explains a trading partners system that is not federated but the
information flow is through the Internet:
VPN
Internet
Firewall
Firewall
Corporate Sales Trading Partners
Back
Office
Front
Office
LAN WAN
LAN
Integration
Knowingly or unknowingly, applications and systems have been built over
decades in silos, and it is the need of the day for these applications and systems
to interchange data. At various levels depending upon the level of control, the
data can be interchanged at multiple layers, protocols, and formats. There seems
to be a general trend of Technology of the day solutions and systems in many
organizations. Neither this trend is going to end, nor do we need to turn back at
them. Instead, we need to manage the ever changing heterogeneity between systems.
Application and system portfolio entropy increases with technology
innovation.
34.
Why Enterprise ServiceBus
[ 12 ]
I don't know if there is a global movement to bring standardization to innovation
in technology. This is because the moment we introduce rules and regulations
to innovation, it is no longer an innovation. This statement is made, even after
acknowledging various world wide standard bodies' aim and effort to reduce
system and application entropy. A few years back, Common Object Request Broker
Protocol's (CORBA) promise was to standardize binary protocol interface so that
any systems could interoperate. If we look at CORBA at this point, we can see that
CORBA has not attained its promise, that doesn't mean that we need to throw away
all those systems introduced during the 90's because we cannot integrate.
Enterprise Application Integration
David S. Linthicum defined EAI as:
The unrestricted sharing of data and business processes among any connected
applications and data sources in the enterprise.
This is a simple, straightforward definition. In my entire career, I have been fortunate
enough to participate in much new generation IT system development for domains
such as Airline, Healthcare, and Communications. Most of the time, I've been writing
either adapters between systems, or negotiating and formalizing data formats
between desperate systems. I know this is not because the former system's architects
haven't put a long term vision to their systems in the angle of interoperability, but
because systems have to evolve and interoperate in many new ways which were
not foreseen earlier. This pushes integration providers to define new software pipes
across applications. When we start this activity it might be elegant and straight
forward, but sooner than later we realize that our integration pipes have no central
control, administration, or management provisions.
Integration Architectures
The first and foremost step in understanding integration architectures is to
understand the different topologies existing in integration arena, and to appreciate
the vital difference between them. If one can understand the true difference, half
the job is already done. Understanding the difference will enable the integration
architect to attach prescriptive architecture for a given integration problem. Let us
now understand the basic integration architectures that are listed as follows:
Point-to-Point solution
Hub-and-Spoke solution
Enterprise Message Bus Integration
Enterprise Service Bus Integration
•
•
•
•
35.
Chapter 1
[ 13]
Point-to-Point Solution
EAI has traditionally been done using point-to-point integration solutions. In point-
to-point, we define an integration solution for a pair of applications. Thus we have
two end points to be integrated. We can build protocol and/or format adapters,
or transformers at one or either end. This is the easiest way to integrate, as long as
the volume of integration is low. We normally use technology-specific APIs like
FTP, IIOP, remoting or batch interfaces, to realize integration. The advantage is that
between these two points, we have tight coupling, since both ends have knowledge
about their peers.
The following figure is the diagrammatic representation of the point-to-point
integration:
Hub-and-Spoke Solution
Hub-and-spoke architecture is also called the message broker and is similar to
point-to-point architecture in that it provides a centralized hub (broker) to which
all applications are connected. When multiple applications connect in this manner,
we get the typical hub-and-spoke architecture. Another distinguishing feature of
the hub-and-spoke architecture is that each application connects with the central
hub through lightweight connectors. The lightweight connectors facilitates for
application integration with minimum or no changes to the existing applications.
36.
Why Enterprise ServiceBus
[ 14 ]
Message transformation and routing takes place within the hub. This architecture
is a major improvement to the point-to-point solution since it reduces the number
of connections required for integration. Since applications do not connect to
other applications directly, they can be removed from the integration topology
by removing from the hub. This insulation reduces disruption in the
integration setup.
There is a major drawback with the hub-and-spoke architecture. Due to the
centralized nature of the hub, it is a single point of failure. If the hub fails, the
entire integration topology fails. A solution to this problem is to cluster the hub.
A cluster is a logical grouping of multiple instances running simultaneously and
working together. But clustering is not the right solution to the problem of single
point of failure. This is due to the fact that the very point in having a hub-and-spoke
architecture is to have a single point of control. This drawback may be offset to some
extent by the fact that most of the clustering solutions provide central management
and monitoring facilities, which will provide some form of centralized control.
The following figure is the diagrammatic representation of the hub-and-spoke
integration:
LC
LC
LC
LC
LC
LC Lightweight Connector
System
System
System System
System
LC System
HUB
37.
Chapter 1
[ 15]
Enterprise Message Bus Integration
While the hub-and-spoke architecture makes use of lightweight connectors for
applications to integrate together through a central hub, many a times the integrating
applications need to interact in a decoupled fashion, so that they can be easily
added or removed without affecting the others. An enterprise message bus provides
a common communication infrastructure, which acts as a platform-neutral and
language-neutral adapter between applications.
This communication infrastructure may include a message router and/or Publish-
Subscribe channels. So applications interact with each other through the message bus
with the help of request-response queues. If a consumer application wants to invoke
a particular service on a different provider application, it places an appropriately
formatted request message on the request queue for that service. It then listens for
the response message on the service's reply queue. The provider application listens
for requests on the service's request queue, performs the service, and then sends (if)
any response to the service's reply queue.
We normally use vendor products like IBM's Websphere MQ (WMQ) and
Microsoft MQ (MSMQ), which are the best class message queue solution to integrate
applications in the message bus topology. As shown in the following figure,
sometimes the applications have to use adapter which handle scenarios such as
invoking CICS transactions. Such an adapter may provide connectivity between
the applications and the message bus using proprietary bus APIs, and application
APIs. The Message bus also requires a common command structure representing
the different possible operations on the bus. These command sets invoke bus-level
primitives which includes listening to an address, reading bytes from an address,
and writing bytes to an address.
38.
Why Enterprise ServiceBus
[ 16 ]
Enterprise Service Bus Integration
The service bus approach to integration makes use of technology stacks to provide a
bus for application integration. Different applications will not communicate directly
with each other for integration; instead they communicate through this middleware
Service Oriented Architecture (SOA) backbone. The most distinguishing feature of
the ESB architecture is the distributed nature of the integration topology. Most ESB
solutions are based on Web Services Description Language (WSDL) technologies,
and they use Extensible Markup Language (XML) formats for message translation
and transformation.
ESB is a collection of middleware services which provides integration capabilities.
These middleware services sit in the heart of the ESB architecture upon which
applications place messages to be routed and transformed. Similar to the
hub-and-spoke architecture, in ESB architecture too, applications connect to the ESB
through abstract, intelligent connectors. Connectors are abstract in the sense that
they only define the transport binding protocols and service interface, not the real
implementation details. They are intelligent because they have logic built-in along with
the ESB to selectively bind to services at run time. This capability enhances agility for
applications by allowing late binding of services and deferred service choice.
The following figure is the diagrammatic representation of ESB integration:
39.
Chapter 1
[ 17]
The above qualities of ESB provides for a true open enterprise approach. As we have
discussed above, ESB is neither a product nor a separate technology; instead, ESB is
a platform-level concept, a set of tools, and a design philosophy. What this means
is, if we just buy a vendor product and install it in our IT infrastructure, we cannot
say that we have ESB-based integration architecture. Instead ESB-based integration
solutions are to be designed and built in the ESB way. Tools and products help us
to do this.
A list of major features and functionalities supported by an ESB will help us to
understand the architecture better, which are listed as follows:
Addressing and routing
Synchronous and asynchronous style
Multiple transport and protocol bindings
Content transformation and translation
Business process orchestration
Event processing
Adapters to multiple platforms
Integration of design, implementation, and deployment tools
QOS features like transactions, security, and persistence
Auditing, logging, and metering
Management and monitoring
Enterprise Service Bus versus Message
Bus
Let's leave alone the point-to-point and the hub-and-spoke architectures, since it
is rather easy to understand them and you have been doing them in one way or
another. But when we discuss about ESB and message bus, we need to understand
the similarities and differences between these two topologies.
Similarities and Differences
Let us first see how the message bus and the service bus are alike. In fact, both of
them are aimed to solve the problem of integration and provide a common
communication infrastructure, which acts as a platform-neutral and language-neutral
adapter between applications. So mediation is the prime functionality provided by
•
•
•
•
•
•
•
•
•
•
•
40.
Why Enterprise ServiceBus
[ 18 ]
both the architectures. Applications can integrate each other in a loosely coupled
manner through this mediator, so that they will not be dependent on each other's
interfaces. Last but not the least, using either the message bus or the service bus
architecture, you can implement SOA-based integration solutions!
The last statement might be hard to digest—at least some of you might have thought
that one is purely SOA-based while the other is not. But the fact is that both the
message bus and the service bus helps enterprises to attain an SOA ecosystem, if
architected properly, but neither of them by itself will automatically transfer existing
non-SOA architecture into SOA-based architecture.
Now, what is the difference between a message bus and a service bus?
Before we dig into the differences let me give you a word of caution. Even though
the main differences between a message bus and a service bus will be listed as
follows, they may not be very obvious in the first read. Hence, I recommend the
reader to go through the subsequent chapters and samples too, and get a feel of how
we do things in the ESB way, and then revisit the given differences.
The main difference between enterprise message bus and enterprise
service bus architecture is in the manner in which the consumer or the
client application interact with the messaging middleware.
More easily said, than understood! OK, let us worry less (I didn't say let us worry
not!), understand more.
Service description and service discovery are two key elements to attain higher levels
of SOA maturity. Only if something is described, can it be discovered. This is where
a service registry is going to add value, there you can register a service description so
that some other interested party can discover it.
Let us now come back to our message bus. We earlier saw that message bus
applications interact with each other with the help of request-response queues. If
you have ever worked in any messaging solution (like JMS) before, then you will
appreciate the fact that queues are addressed by themselves, which will not give you
any further information about the underlying service. Information on the operations
available, or the messaging patterns to expect, or the schema for the types exchanged
is never available at the queue-level. In other words, services are not described in a
message bus.
What is available is just the messaging counterparts for the put and get primitives so
that messages can be sent to and received from the message bus. So consumer or client
applications should have pre-awareness of the format of the messages exchanged.
This implies everything has to be known before hand—rather, static binding or
compile-time binding becomes the norm.
41.
Chapter 1
[ 19]
Let us now consider the service bus. We said earlier that many ESB solutions are
based on WSDL technologies, and they use XML formats for message translation
and transformation. This by itself gives us lot of opportunities for service description
and discovery. All the (minimum) details about the service will be available from
the WSDL. Hence, message exchange patterns and message formats are readily
available. Moreover, the consumer or client applications can discover a matching
service from the ESB, given a set of messaging capabilities (WSDL capabilities) they
are looking for. I used the term matching service because in an ideal ESB architecture
the consumer is looking for capabilities which match their abstract service
expectations (interface). It is the role of the ESB to route the requests to any concrete
service implementation behind the bus which matches the requested interface.
The next big difference is the type of approach used in each architecture. In service bus
architecture we used a standard-based approach. When services are WSDL-based, it
brings a time tested and well adopted industry standard to integration. This has a big
pay off when compared to traditional Message Oriented Middleware (MOM), because
in the message bus architecture the adapters provide connectivity using proprietary
bus APIs and application APIs. So, whereas in the pre-ESB world, we have been using
CORBA IDL (Interface Definition Language), or Tuxedo FML (Field Manipulation
Language), or COM/DCOM Microsoft IDL, and CICS common Area (COMMAREA)
as the service definition language, we now use WSDL as the interface in
standard-based ESB architectures.
Maturity and Industry Adoption
Having looked at a few of the similarities and differences between service bus and
message bus, it is time now to look at realities which exist in the industry today. We
agreed that an ESB can do lot many things, and for that matter a message bus can
too. We then talked about the differences a service bus has to offer.
How mature is the technology today to address these differences? Have we started
practical implementations of service bus in a big way yet? The answer to this
question is neither yes nor no. The reason is that necessity runs before standards.
Rather, when you agree that you need description and discovery along with other
features for a service bus-based architectures, the question is, will the existing
standards like Universal Description Discovery and Integration (UDDI) alone will
help to achieve this? Maybe we need a simple and standard way to specify a pair of
request-reply queues along with a HTTP URL (mechanism to specify HTTP URL is
already available) in the WSDL itself. This way a consumer or client application can
interact in the 'MOM way' through the ESB. Maybe we also need a simple and, again,
a standard way to find and invoke a concrete service at the ESB, matching an abstract
service interface.
42.
Why Enterprise ServiceBus
[ 20 ]
These standards are evolving and are at different stages of adoption. Similar is the
case of support for these capabilities across multiple vendors' solutions. Hence,
the tail piece is that it is time now to gather all our experience in message bus
based architectures, and leverage it to define and demonstrate service bus-based
architecture. So, how do we decide that we need an ESB-based Architecture? Read
on the next section and you will come to know.
Making the Business Case for ESB
Just like any one of you, I am not satisfied yet with enough reasons for why to use
ESB. Hence, this section is going to explain more about the value proposition ESB is
going to bring to your IT infrastructure.
There are a few concerns we need to address when we do point-to-point or a similar
style of integration:
How many channels do we need to define for complete interoperability?
How easy it is to change a system interface, while still maintaining
interoperability?
How do we accommodate a new system to the IT portfolio?
How much we can reuse system services in this topology?
Where do we plug-in system management or monitoring functionality?
Let us address these issues one by one.
How many Channels
Let us go back to the point-to-point integration scenario and assume that we have
four separate in-house systems, one for each of the four separate departments
(HR, Accounts, RD, and Sales). The operational problem the business faces is
to interoperate these systems. In the point-to-point integration, we need to have
independent channels of connection between each pair of systems. These channels
are static, strongly typed, and without much intelligence for dynamic routing or
transformation. The advantage is that it is rather easy to build the solution.
As shown in the next figure, if there are six systems (nodes) to be interconnected, we
need at least thirty separate channels for both forward and reverse transport. If we
add one more node to the IT portfolio, the number of channels to be defined goes up
from thirty to forty two. This means, as time passes and as more and more systems
and applications are added to the organization, the number of interconnections or
channels to be defined between these systems rises exponentially, in the order of two.
•
•
•
•
•
43.
Chapter 1
[ 21]
We can generalize the number of channels (Nc) required for complete interconnection
for n separate systems as:
Nc = n2 – n
This number is still manageable for small organizations with a small number of
systems, but experience has shown that this is going to be a nightmare for
mid-sized and large-sized organizations. It is customary for such organizations to
have more than fifty or hundred systems. For complete interoperability in a hundred
system scenario, we need to define around ten thousand separate channels! Leave
alone the definition, how do we maintain such a huge network of interconnection?
Perhaps, every system in an organization needn't interoperate with every other
system. Again, experience has shown that only half of them need to interoperate
fully, thus bringing down the figure to five thousand. What this means is, we have
to build five thousand adapters to define channels to interoperate for these systems.
Still this number is not manageable.
44.
Why Enterprise ServiceBus
[ 22 ]
Volatile Interfaces
In a perfect world, we can somehow build five thousand separate adapters to
interconnect a hundred systems by fifty percent, and then hope to relax. But the real
scenario is far from perfect. The imperfection arises out of constant innovation and
evolution, and this forces change even to system interfaces. An int data type in C++
is of two bytes whereas the same int in Java is of four bytes. We have already taken
care of this data impedance by building adapters. But, what if on one fine morning,
the C++ application starts spitting float instead of int? The existing adapter is
going to fail, and we need to rework on the adapter in this channel.
The good news is, within an organization this can be controlled and managed
since we have access to both the ends of the adapter. The scenario worsens when
the interface changes in a B2B scenario where systems between two separate
organizations interact. As we know already, this is going to happen. So, we have to
build agile interfaces.
New Systems Introducing Data Redundancy
Adding new systems is an after effect of business expansion, but there are multiple
risks associated with it. First, we need to integrate new systems with the existing
systems. Secondly, many a time, new systems introduce data redundancy. This
is because the same data might get entered into the network through multiple
interfaces. Similar is the problem of the same data duplicated at different parts of
the organization. This contradicts the requirements of Straight-Through Processing
(STP). STP aims to enter transactional data only once into the system. This data can
flow within or outside the organization. To achieve STP, there should be mechanism
for seamless data flow, also in a flexible manner.
Data redundancy can be managed if and only if there is a mechanism to consolidate
data in the form of Common Information Model (CIM). For example, the NGOSS's
Shared Information/Data (SID) model from Telecom Management Forum is the
industry's only true standard for development and deployment of easy to integrate,
flexible, easy to manage OSS/BSS components. The SID provides an information
or data reference model and a common information or data vocabulary from a
business and systems perspective. Not every domain or organization has access to a
readymade information model similar to this.
In such a scenario, ESB can play a vital role by providing the edge of the system view
by wrapping and exposing available network resources. Thus, ESB provides hooks
for a leave-and-layer architecture which means that instead of altering existing
systems to provide a standards-based services interface they are wrapped with a
layer that provides the services interface.
45.
Chapter 1
[ 23]
Service Reuse
Code and component reuse is a familiar concept amongst designers and developers.
We have Gang of Four patterns to prescribe design solutions for recurring problems.
But with the invention of SOA, we have what is called the Service Oriented
Integration (SOI) which makes use of Enterprise Integration Patterns (EIP). SOI
speaks about the best ways of integrating services so that services are not only
interoperable but also reusable in the form of aggregating in multiple ways and
scenarios. This means, services can be mixed and matched to adapt to multiple
protocols and consumer requirements.
In code and component reuse, we try to reduce copy and paste reuse and encourage
inheritance, composition, and instance pooling. A similar analogy exists in SOI
where services are hosted and pooled for multiple clients through multiple transport
channels. ESB does exactly this job in the best way integration world has ever seen.
For example, if a financial organization provides a credit history check service, an
ESB can facilitate reuse of this service by multiple business processes like a Personal
Loan approval process or a Home Mortgage approval process.
System Management and Monitoring
Cross cutting concerns like transactions or security or even Service Level Agreement
(SLA) management and monitoring are just a few of a set of features apart from
business functionality that any enterprise class service ecosystem has to provide.
The ESB architectures provides enough hooks to attach similar services onto the bus
separate from normal business functionality. This ensures that these cross cutting
functionality can be applied to all services and also enable us to manage, monitor,
and control them centrally.
Enterprise Service Bus
Having understood the various integration problems, which can be addressed in
multiple ways, of which ESB is of the prime concern and is central to our discussion
in this book, we will try to understand the ESB better here.
Service in ESB
It is time now to understand Service in ESB. Why don't we call it Enterprise
Component Bus?
46.
Why Enterprise ServiceBus
[ 24 ]
Services are exposed functionalities which are clearly defined, self contained, and
which will not depend on the state and context of peer services. As shown in the
following figure, the service has a service description (similar to WSDL) and it is
this description which is exposed. It is never necessary to expose the implementation
details, and in fact, we shouldn't expose them. It is this hidden nature of the
implementation which helps us to replace services with similar services. Thus,
service providers expose the service description and service consumers find them.
Once the service description is found service consumers can bind to it. Moreover, it is
during the time of actual binding, we need more information like transport protocols.
As we know, we can handle with transport details with the help of protocol adapters.
Intelligent adapters are required if we need to route messages based on content or
context. These adapters are of a different kind like splitters and content based routers.
ESB is all about a run-time platform for these kinds of adapters and routers, which are
specifically designed for hosting and exposing services.
Publish Consume
Request Request
Response Response
Messaging
Middleware
5 6
2
3
4
1
Service
Description
Service
Consumer
Service
Provider
Abstraction beyond Interface
Almost all OOP languages support interface-driven development and hence this is
not a new concept. Separating interface from implementation abstracts the Service
Consumer from the implementation details from a Service Provider perspective. But,
what about abstracting out this interface itself? If the Service Consumer interacts
directly with the Service Provider, both these parties are tightly coupled and it may be
difficult to change the interface. Instead, a service bus can effectively attach itself to a
service registry. This means, a consumer can even be unaware of the service interface.
Now, just in time, the consumer can selectively choose an appropriate interface
from a registry, then bind to a suitable implementation through an ESB, and invoke
the service at run time. Such kinds of flexibility come at the cost of design time or
compile time type checking, which can be error prone during service invocation
using conventional tools. An ESB with its set of tools and design primitives helps
developers to effectively address this.
47.
Chapter 1
[ 25]
Service Aggregation
The key value of aggregation, here, is not so much in being able to provide core
services, which developers have to build anyway. It is to facilitate an arbitrary
composition of these services in a declarative fashion, so as to define and publish
more and more composite services. Business Process Management (BPM) tools can
be integrated over ESB to leverage service aggregation and service collaboration.
This facilitate reuse of basic or core (or fine grained) services at the business
process-level. So, granularity of services is important which will also decide the
level of reusability.
Coarse Grained or Composite Services consume Fine Grained Services. Applications
which consume Coarse Grained Services are not exposed to the Fine Grained
Services that they use. Composite Services can be assembled from Coarse Grained as
well as Fine Grained Services.
To make the concept clear, let us take the example of provisioning a new VOIP
Service for a new customer. This is a Composite Service which in turn calls
multiple Coarse Grained Services such as validateOrder, createOrVerifyCustomer, and
checkProductAvailability. Now, createOrVerifyCustomer, the Coarse Grained Service
in turn call multiple Fine Grained Services like validateCustomer, createCustomer,
createBillingAddress, and createMailingAddress.
As is shown in the above figure, a Composite Services is an aggregate of other
Composite Services and/or Coarse Grained Services. Similarly, Coarse Grained
Services are again aggregates of other Fine Grained Services. Whereas, Fine
Grained Services implement minimum functionality and are not aggregates of other
services. ESB here acts as a shared messaging layer for connecting applications and
other services throughout the enterprise, thus providing a workbench for service
aggregation and composition.
48.
Why Enterprise ServiceBus
[ 26 ]
Service Enablement
Services can be designed but if left alone they will sit idle. The idea behind true
SOA is not just service definition or implementation, but also service enablement.
By service enablement, we mean enabling, configuring, tuning, and attaching QOS
attributes to services, so that they are accessible, as per SLA irrespective of formats or
transport protocols.
Using today's techniques like Aspect Oriented Programming (AOP), Annotations
and byte code instrumentation, service enablement can be done without any
dependency on the services framework. An ESB does exactly this. It is to be noted
that a JBI-based ESB will do this API-less. It is not completely API-less, in the sense
that there is always a dependency on an XML configuration or annotation. The
differentiating factor is that this dependency is externalized so that they are not
cemented to the service implementation.
Service Consolidation
Service consolidation is an important step to eliminate redundant information
and data. As a part of service consolidation, we may have to first consolidate IT
infrastructure and data assets in the network. There should be clear ownership
for these two entities, so that we know who or which applications are changing
which sectors of the data assets. Once this is done, the next step is to do application
portfolio analysis and do direct mapping between services and data operations
(business-level CRUD).
A point to be noted here is that I am not talking about exposing simple Create,
Read, Update, and Delete operations to be exposed as services, since they are not
(coarse grained) services at all. They are just functions to alter the constants of data
model and if we expose them as services, we are trying to expose our internal data
modeling, which is going to impact internal agility. Instead, what we have to expose
is our coarse grained business operations (processes) which carry out useful business
functions on behalf of client applications. When we do that, we can map which
services need to be invoked to finish an online retailing experience, and which other
services are responsible for realizing the retail booking in the back office systems.
Thus services are named, labeled, and all the more indexed. And you look at the
index for a particular service similar to the way you look at a book index, to find a
particular subject. Thus, we effectively pool services and consolidate unused capacity
formerly spread over many connected systems and servers.
passage of Plutarch48that runs to this effect: “But of the Syrian
goddess the superstitious believe that, if a man eat a sprat or
anchovy, the goddess consumes his shin-bones, fills his body full of
sores, melts down his liver.” The legend must at any rate be of great
antiquity, for we meet with it in Menander, in a fragment which
Porphyrius49 has preserved,—in which however swelling of the belly
and the feet is in question. To this also would seem to refer what
Persius (loco citato) says:
Hinc grandes Galli et cum sistro lusca sacerdos,
Incussere D e o s i n f l a n t e s c o r p o r a, si non
Praedictum ter mane caput gustaveris alli.
(Then the tall Galli, and the one-eyed priestess with her sacred
rattle, instil terror of the gods that make men’s bodies swell, unless
three times at dawn you have eaten the prescribed head of garlic).
True we cannot from the passage of Plutarch directly conclude that
ulcers of the throat also were ascribed to the anger of the Syrian
goddess in consequence of indulgence in a fish diet; rather should
we expect what is said to apply primarily to external skin-ulcers,
occurring on other parts, as just on the shin-bone. Still we shall be
quite justified in making the reference general, more particularly as
liver-complaint is also ascribed to the goddess’s interference, and we
shall see that in Antiquity the cause of all ulcers was supposed to lie
in some fault of the liver. Now as the fish had necessarily to be put
into the mouth to be swallowed, and as it was always supposed the
punishment of the goddess followed immediately on the offence,
and affected the immediately active part, throat-ulcers might very
naturally be taken to be a result of such punishment. This again only
further confirms our explanation just above to the effect that ulcers
of the throat were a consequence resulting from vicious indulgence.
For the Temple-service of the Dea Syra was of course connected
with every sort of licentious practice.
51.
Taking into considerationthis marked prevalence of Corrosion of
the Shin-bones, we might argue with considerable probability that it
pointed to the existence of a disease of the bones following as a
result of vicious indulgence. On the other hand the observation that
the precise time the body became covered with ulceration was after
indulgence in fish-eating cannot help being of weight in connection
with the doctrine of Leprosy; for to the present day we note as very
frequent among peoples whose chief nutriment is fish various forms
of Leprosy. And again, we may very likely see in this prohibition of a
fish diet, which is also mentioned by Athenaeus50, a sanitary
regulation justified by experience as necessary in Syria, where skin-
diseases and ulcerations were so common.
But not alone in Egypt and Syria did fellation lead to suchlike
unhappy results; we find the same to have been the case at Rome,
as is proved by the following passage of Martial51, a passage that
has hitherto been completely overlooked in this connection, but
which is none the less of great importance:
I n d i g n a s p r e m e r e t p e s t i s c u m t a b i d a
f a u c e s
I n q u e i p s o s v u l t u s s e r p e r e t a t r a l u e s:
Siccis ipse genis flentes hortatus amicos
Decrevit Stygios Festus adire lacus.
Nec tamen obscuro pia polluit ora veneno,
Aut torsit lenta tristia fata fame:
Sanctam Romana vitam sed morte peregit,
Dimisitque animam nobiliore via.
Hanc mortem fatis magni praeferre Catonis
Fama potest: huius Caesar amicus erat.
(When corrupting disease began to sorely afflict his unworthy
throat and black contagion was creeping to his very face, Festus,
himself with dry cheeks, comforted his weeping friends, and
determined to seek the pools of Styx. But still he never disgraced his
52.
dutiful lips withdarkling poison, nor brought on a painful, miserable
end by slow hunger; nay! rather by a Roman death he completed his
holy life, and dismissed his soul the nobler way. Such a death fame
may well exalt above great Cato’s end; Caesar was his friend).
The words indignae fauces (unworthy throat) obviously point to
the practice of fellation, whereby he had brought on himself the
pestis tabida and atra lues, (corrupting disease, black contagion),
and so we have here a clear statement of the cause by one doctus
venereae cupidinis (learned in the passion of love), which cause was
quite unknown to the artifex medicus (medical practitioner). The pia
ora (dutiful lips) are therefore to be taken merely ironically, as also
the sancta vita (holy life). Even the Cinaedus, as well as the maidens
who prostitute themselves in honour of Astarté, are invariably, as we
have seen, described in the Old Testament as sanctus (holy), and we
read e. g. in Job. Ch. XXXV. 14., of a good-for-nothing, how he will
die like such a sanctus. It was precisely this signification of sanctus
that led us to the idea of taking the throat affection for a secondary
consequence of paederastia, especially if we understand a double
entendre to underlie the last words huius Caesar amicus erat
(Caesar was his friend). The Commentators it is true take them
merely as said by way of contrast with the death of Cato of Utica,
who was forced by Caesar’s enmity to take his own life, and as
implying this was not the case with Festus, consequently that his
suicide is so much the more remarkable52. However it is doubtful
which Caesar is meant, whether the word is merely a Title or a
proper name. In the second—and certainly this at first appeared to
us to be the more likely,—view we were of course bound then to
turn our attention to his character for dissoluteness. However as
both Catullus53 and Suetonius54 represent him merely as a Cinaedus
in regard to the male sex, if that is to say we subscribe to the
accepted opinion, we afterwards came to the conclusion it was
rather the Emperor generally that is spoken of here, and
consequently that any other Emperor, e. g. Tiberius, or Nero, or
another, might be intended. It is true that if pathicus (pathic) and
53.
omnium virorum mulier(wife of all men) are taken in a wider sense,
there would be nothing to make the supposition impossible that
Julius Caesar is pointed at. Only that perhaps another passage of
Martial would seem to go against this, a passage where he seeks to
excuse the several excesses and vices of a certain Gaurus by
instancing an exalted personage as patronizing each of them, and
says finally (Bk. II. 89.):
Quod fellas; vitium dic mihi cuius habes?
(But for your fellation: tell me whose vice you follow in this?) Still
against the cinaedus view the words indignae fauces (unworthy
throat) speak clearly. Probably in this connection the following
passage of Martial should also come in,—where the Poet says of his
servant (Bk. I. Epigr. 102.):
Destituit primos virides Demetrius annos:
Quarta tribus lustris addita messis erat.
Ne tamen ad Stygias famulus descenderet umbras,
U r e r e t i m p l i c i t u m c u m s c e l e r a t a l u e s,
Cavimus et domini ius omne remisimus aegro:
Munere dignus erat convaluisse meo.
Sensit deficiens sua praemia, meque patronum
Dixit, ad infernas liber iturus aquas.
(Demetrius left us in the first years of his bloom; the fourth
summer was but just added to his three lustres. We took all means
to save our faithful house-slave from descending to the shades of
Styx, when he was consuming under a malignant contagion that had
fastened upon him, and remitted all my master’s rights for the sick
lad,—who indeed well deserved to win recovery at my hands. On his
death-bed he recognized what I had done for him, and called me his
master, though so soon to go forth a free man to the streams of the
nether world.)
54.
Was this famulus(house-slave) the same person as the puer (boy,
slave), who is mentioned by Martial, bk. XI. 95.?
That not boys only, but girls too, had to suffer in this way among
the Romans, and lost their lives from the complaint in question, is
shown, we think, by the following Epigram of Martial, Bk. XI. Epigr.
91.:
Aeolidon Canace iacet hoc tumulata sepulchro,
Ultima cui parvae septima venit hiems.
Ah scelus, ah facinus! properas quid flere viator?
Non licet hic vitae de brevitate queri.
Tr i s t i u s e s t l e t o l e t i g e n u s : h o r r i d a
v u l t u s
A b s t u l i t e t t e n e r o s e d i t i n o r e l u e s :
I p s a q u e c r u d e l e s e d e r u n t o s c u l a m o r b i ;
N e c d a t a s u n t n i g r i s t o t a l a b e l l a r o g i s .
Si tam praecipiti fuerant ventura volatu,
Debuerant alia fata venire via.
(Canacé of the Aeolians lies buried in this tomb, who died a child,
—her seventh winter was her last. Oh! the shame and horror of it!
haste, a tear, thou that passest by. Here is no occasion to lament the
short span of human life. Sadder than death is the way of her death;
a dread contagion ate away her face, and settled in the tender little
mouth. Cruel disease infected her very kisses; and her lips were half
gone when they were consigned to the grim pyre. If death must
needs have come to her with a flight so swift, at least he should
have taken another way. Death so hasted to close the issue of her
persuasive voice, that her tongue might not have time to bend the
cruel goddesses to mercy).
Besides the passages quoted, there are several others to be found
in Martial, that must be taken as referring to the fellator; but since
the maladies that occur are equally prevalent in the case of the
55.
Cunnilingue, it willbe more convenient to adduce them under that
head. Further, we only require to mention the fact that pale lips
seem to have been regarded as a mark of the fellator55.
The Cunnilingue.
§ 23.
But the vice of the fellator is far surpassed in baseness by that of
the Cunnilingue (qui opus peragit linguam arrigendo in cunnum,
eumque lambit,—one who works by putting his tongue up into the
female organ, and licking it). The Greeks called this practice σκύλαξ
(a puppy), because it is a habit of dogs56, and Hesychius explains it
by σχῆμα ἀφροδισιακὸν, ὡς τὸ τῶν φοινικιζόντων (a method of love,
resembling that of those who phoenicize). We have already, in the
passage of Lucian quoted a little above, found φοινικίζειν and
λεσβιάζειν put side by side; Galen moreover57 does the same in the
following passage, a noteworthy one for our purpose on several
accounts: “The drinking of sweat, urine and the menstrual blood of
women is vicious and shameful, and not less so when a person, as
Xenocrates proposes to do, smears the regions of the mouth and
throat with excrement, and swallows it down. He speaks also of
taking the wax of the ears. For my part I could never bring myself to
take this, even though by that means I were never to be ill again.
But excrement I consider yet more disgusting, and it is for a man of
any decency far more shameful to be called an Excrement-Eater58
than an αἰσχρουργὸς (worker of obscenities) or a cinaedus. But of
αἰσχρουργοὶ59 (workers of obscenities), we abominate Phoenicians
more than the Lesbians, and it seems to me the man does
something of the same sort as the former who drinks menstrual
blood (μᾶλλον βδελλυττόμεθα τοὺς φ ο ι ν ι κ ί ζ ο ν τ α ς τῶν
λεσβιαζόντων ᾧ60 φαίνεταί μοι παραπλήσιόν τι πάσχειν ὁ καὶ
καταμηνίου πίνων.) A sensible man will neither seek to collect
experiences on the point, nor yet on a practice, which it is true
56.
involves less, butstill is sufficiently shameful, that of smearing a part
of the body with excrement, because he has some hurt at that spot,
—or with human seed. Xenocrates calls this latter commonly γόνος
(seed, semen), and distinguishes with minute care between cases
where simple seed rubbed in by itself is of benefit, and cases where
the female has the same effect after combination with the male, as
it is discharged from the woman’s womb.”
This explanation of Galen’s to the effect that the φοινικίζων (one
who phoenicizes) resembles the man who drinks menstrual blood,
shows clearly that φοινικίζειν is not, as all the Lexicons give it, and
Forbiger (loco citato) also assumes, identical with λεσβιάζειν. It is
true Forbiger (p. 329. Note v.) gives the meaning cunnilingere as
well, although the explanation is undoubtedly unsatisfactory which
he offers à propos of an Epigram,61—one certainly apposite in this
connection, to the effect that the reason for this signification is,
quod cunnilingos a natando in mari quodam Phoenicei coloris (mari
rubro) dixissent, (that they had called them cunnilingues from their
swimming as it were in a sea of Phoenician purple colour—a red
sea); for the words in the Epigram, ἐν φοινίκῃ δὲ καθεύδεις (but you
sleep in Phoenicia) cannot stand for anything else but simply
φοινικίζειν, as indeed the passage from Aloisia Sigaea, which is
quoted by Forbiger himself, proves conclusively62: Cum vellet
mediam lambere, se velle dicebat in Liguriam, (When he wanted to
lick my middle, he used to say he would fain be into Liguria—that is,
would fain lick, ligurire). Accordingly just as λεσβιάζειν came into use
as the distinctive name for the vice of the fellator, because it was
practised to a distinctive degree in Lesbos, so too to be a
cunnilingue was called φοινικίζειν, because the habit was at home
among the Phoenicians. Undoubtedly men’s shamelessness was
carried so far that they actually used women and girls at their period
of menstruation for this purpose,—a fact of the highest interest for
us, as we shall show directly. Seneca63 expresses himself plainly
enough on the subject: “Quid tu, cum Mamercum Scaurum
consulem faceres, ingnorabas, a n c i l l a r u m s u a r u m
57.
m e ns t r u u m o r e i l l u m h i a n t e e x c e p t a r e? num quid
enim ipse dissimulabat? num quid purus videri volebat?” (How came
it you were ignorant, when making Mamercus Scaurus consul, that
he was in the habit of catching in his open mouth the menstrual
discharge of his maidservants? Did he make any concealment of it
himself? did he pose as a pure-minded man? nay! not he). Again in
another place64:
“Nuper Natalis tam improbae linguae quam impurae, i n c u i u s
o r e f e m i n a e p u r g a b a n t u r.” (Quite lately Natalis showed
himself as malignant of tongue as he is unchaste, into whose mouth
women were used to purge themselves).
Now if first of all we bear steadfastly in mind that this φοινικίζειν
was a vice, which prevailed primarily and especially among the
Phoenicians and was later on disseminated abroad by them, and
then consider how the Greeks designated every vice, and particularly
excesses in love, as νόσος (disease), in the same way precisely as
the Romans used morbus (disease),—comp. § 17—we must see that
φοινικίζειν is the same thing as νόσος φοινικίη (Phoenician disease),
and shall be in a position to form an opinion on the Gloss65 falsely
ascribed to Galen, which reads: φ ο ι ν ι κ ί η ν ό σ ο ς· ἡ κατὰ
Φοινίκην καὶ κατὰ τὰ ἄλλα ἀνατολικὰ μέρη πλεονάζουσα. δηλοῦσθαι
δὲ κἀνταῦθα δ ο κ ε ῖ ἡ ἐλεφαντιάσις. (Phoenician disease: a disease
prevalent in Phoenicia and about the Eastern parts. Elephantiasis
appears to be signified by this).
Even granting the first part of this Gloss to have been really
written by Galen, the last sentence at any rate is obviously an
extraneous and later addition. This is at once indicated by the use of
the word δοκεῖ (it appears), which comes in curiously, standing as it
does next-door to the definite statement that this νόσος (disease)
was common in Phoenicia; for surely anyone who knew this, must
also have known what the disease was. Again if he had wished to
describe it by some such phrase as the English “a sort of
Elephantiasis”, he could hardly have failed to express himself in a
58.
different way towhat he has. But as a matter of fact, Galen knew
perfectly well, as we have already seen, what φοινικίζειν was, and
consequently what the φοινικίη νόσος (Phoenician disease) was, and
it could not by any possibility have occurred to him to suppose it any
form of Elephantiasis. Unfortunately Prof. Naumann66 has allowed
himself to be misled by this extraneous addition; he writes: “In the
Work of a Pseudo-Galen is given a short explanation of the φοινικίη
νόσος (Phoenician disease), or rather to speak strictly, the
conjecture is made,67 that this malady, a common one in Phoenicia
and the East, may have been Elephantiasis.” True indeed the word
might with equal likelihood express a disease characterized by
redness of the skin φοινίκιος s. φοινίκεος i. q. puniceus, purpureus,
cruentus; φοινιγμὸς irritatio cutis per vesicantia—φοινίκιος or
φοινίκεος = Phoenician purple, purple, blood-red; φοινιγμὸς =
irritation of the skin by rubefacients). Or should we suppose some
leprous-venereal malady endemic and aboriginal among the trading
Phoenicians to be signified, which was called the Morbus Phoeniceus
(Phoenician disease) in the same way as in more modern times
people spoke of the Morbus Gallicus (French disease,—Syphilis)? In
any case it is remarkable that Themison (who also noted incidentally
that Satyriasis at times attacks a population epidemically,—speaks of
the special frequency of Satyriasis in Crete (Caelius Aurelianus, Acut.
Morb. bk. III. ch. 18). As is well known, Phoenician and Hellenic
Colonies had converged here; and the island remained in
uninterrupted and active commercial intercourse with the maritime
cities of Phoenicia.
According to the general supposition the Gloss of the Pseudo-
Galen has reference to a passage of Hippocrates occurring in the
Second book of the Prorrhetica,68 where we read as follows: “But
λειχῆνες—tetters, as also λέπραι and λεῦκαι,—scaly leprosies and
white leprosies, where any of these occur in the young or mere
children, or after appearing on a small scale shall then increase but
slowly, in these cases it is not right to call the exanthema or eruption
an apostasis, (transitional state), but a νόσημα,—condition of
59.
disease. On theother hand where any of these affections occurs on
a large scale and suddenly, it would then be an apostasis. But
whereas λεῦκαι arise out of the most deadly diseases, as e. g. the
νοῦσος ἡ φθινικὴ,—wasting disease, as it is called, λέπραι and
λειχῆνες do so from the melancholic, or diseases proceeding from
black bile. And of such the easier to cure are those that occur in the
youngest patients and are of the latest origin, and arise in the
softest and most fleshy parts of the body.” Foesius observes on the
passage: “Nemini autem dubium est, quin hac parte m e n d o s i
s i n t c o d i c e s o m n e s, cum ἡ νοῦσος ἡ φθινικὴ καλουμένη
scribitur. Nam φοινικίη νόσος ex Galeni exegesi procul omni dubio
reponendum.” (Now no one can doubt that all the MSS. are
deceptive here, reading as they do ἡ νοῦσος ἡ φθινική. For φοινικίη
vόσος must undoubtedly be restored from the Exegesis of Galen).
J. W. Wedel69 on the contrary writes: “Legunt quidam pro φοινικίη—
φθινικὴ, et vertunt tabem seu morbum tabidum, s e d c o n t r a
f i d e m c o d i c u m c o r r e c t i o r u m, quibus Galenus ipse
assentitur, et rei ipsius, de qua textus agit, evidentiam.” (Some read
φθινικὴ for φοινικίη, and render it wasting or wasting disease,—but
against the authority of the better class of MSS., with which Galen
himself agrees, and against the evidence of the context of the
matter treated of). In the latter of these two statements Wedel, in
spite of his mistaken view of the matter generally, is perfectly right;
whether he is so in the former as well, we are not in a position to
say, for alas! we lack the critical apparatus absolutely indispensable
for such a decision, not so much as the Edition of Mackius being on
the shelves of our University Library.
In the first place we ought to make quite sure what Hippocrates
understood under the name λεῦκαι. A disease of the Skin no doubt;
but of what particular nature it was, would seem not to be so easy
to determine. According to Coac. praenotion. (Vol. I. p. 321.)
Hippocrates distinguished a λεύκη συγγενής and a λεύκη μὴ
συγγενής (λεύκη inborn, and not inborn), the latter attacking
individuals only after puberty. Hesychius says λεύκη, ἄνθος τι τῶν
περὶ τὸ σῶμα γινόμενον, ἄλφος δὲ λευκή τις ἐν τῷ σώματι. (λεύκη—
60.
white leprosy, aneruption coming out on the exterior parts of the
body, but ἄλφος—dull-white leprosy, a form of λεύκη in the body).
Galen, Definit. med. (Vol. XIX. p. 140) λευκή ἐστιν ἡ ἐπὶ λευκὸν
χρῶμα τοῦ σώματος παρὰ φύσιν μεταβολή. (λεύκη is the change to
an unnatural white colour of the body). According to this it would
appear to be merely superficial discolorations of the skin that writers
understood by λεῦκαι,—a view that Rayer70 seems to coincide with.
Pollux on the other hand offers an explanation as follows: ἀλφὸς
μέλας, ἐπιδρομὴ σκιώδης, ἐπιπόλαιος, εὐίατος, ἀλφὸς λευκὸς,
λευκότης ἐπιτρέχουσα τῇ ἐπιδερματίδι, αὐχμηρὰ, δυσίατος· λ ε ύ κ η,
ὅταν ἐπιτείνῃ ἡ λευκότης, καὶ φύσῃ τρίχωσιν λευκήν, εἰ δὲ
κεντήσειας, ὕφαιμος, δυσίατος, ἐστιν ὅτε ὑπέρυθρος· ἐ π α ν θ ε ῖ δ ὲ
αὐτὸ (?) τοῖς χ ε ί λ ε σ ι ν , ο ἷ ο ν ἁ λ ὸ ς ἄ χ ν η. (Black ἀλφός, a
dark-coloured spreading eruption, superficial and easily curable;
white alphos, a whiteness running over the epidermis (of the
prepuce), dry harsh and difficult to cure; λεύκη, when the whiteness
extends, and produces a growth of white hairs, and if you prick it, it
is suffused with blood, difficult to cure, also sometimes reddish in
hue. And the eruption comes out on the lips like sea-foam). Here
λεύκη is evidently a much more deeply penetrating malady, as
indeed it is described by Celsus71 and Galen.72 It corresponds with
the white Leprosy of Moses. But the most curious thing is the
statement appended to the effect that the affection broke out on the
lips like sea-foam. This is certainly to be referred to some other form
of λεύκη, unless indeed we are to take it in connection with the
succeeding words in the text, λειχὴν ἄγριος (malignant tetter), in
which case, as we have seen with regard to Mentagra (Tetter of the
chin), the remark is based on a perfectly sound observation; and
besides, the αὐτὸ gives absolutely no sense. On the other hand if
Pollux’datum in reference to the seat of λεύκη is correct, it must
obviously afford much light for clearing up the meaning of the
passage in Hippocrates, and in deference to it we shall be bound to
read φοινικίη instead of φθινικὴ,73—an emendation that presents no
difficulty, since φθινικὴ might very easily be read for φοινικίη, and
indeed (as pointed out in the Note) was actually so read.
61.
But one emendationleads on to another, and we shall find
ourselves bound, on the analogy of the θαυμαστὸν πάθος (wonderful
complaint) in Dio Chrysostom, to read here also θαυμαστωτάτων
νοσημάτων (of the most wonderful diseases) for θανατωδεστάτων
ν., and translate accordingly: “but λεῦκαι arise out of the most
terrible aberrations of the mind,” such for instance as the vice of the
cunnilingue is. If we examine further, we shall see it is not λευκαὶ
but λεῦκαι that stands in the text, so it cannot be a question of a
skin-affection of the leprosy type at all, for λευκὸς (white) rather
implies transparent and shiny, and Martial (XI. 99.) in a passage to
be discussed more fully later on, says:
Non ulcus acre, p u s t u l a e v e l u c e n t e s,
Nec triste mentum, sordidique lichenes,
(No biting ulcer, or shiny pustules, nor yet disfigured chin, and foul
scabs). Accordingly we have here nothing whatever to do with the
leprous-like λευκὴ, but only with pustulae lucentes (shiny pustules),
which as we shall show presently were a consequence of the
practices of the cunnilinigue. We have the more right to assume this,
as the old Physicians ascribe λευκὴ to the φλέγμα (phlegmatic
humour),—an explanation all the more likely to have been given, as
directly afterwards follow the words, αἱ δὲ λέπραι καὶ οἱ λειχῆνες ἐκ
τῶν μελαγχολικῶν (but leprosies and tetters arise out of the
melancholic diseases). True this is in contradiction with another
passage of Hippocrates,74 for in this we read: λ έ π ρ η καὶ κνησμὸς
καὶ ψώρη καὶ λ ε ι χ ῆ ν ε ς καὶ ἀλφὸς καὶ ἀλώπεκες ὑπὸ
φ λ έ γ μ α τ ο ς γίνονται. (leprosy, and itch, and scab, and tetters,
and dull-white leprosy, and manges, arise from phlegm). This much
at any rate appears to us to result, viz. that the whole passage
under discussion cannot possibly be by Hippocrates, but much more
probably is due to some author of the Alexandrine age, who enjoyed
ample opportunities for studying the consequences of the unnatural
excesses as so often observed since Pompey the Great’s time.
62.
To assume thatHippocrates was actually acquainted with these in
any completeness would up to the present be premature; at any rate
we are bound, so far as our study of his writings enables us to
judge, to deny him any knowledge of the fact that sexual excesses
were the cause of the different affections of the genital organs
chronicled by him. Of course he may have supposed all this to be
notorious and the knowledge of it common property, but a host of
statements would be found to tell against any such supposition.
Opportunities of making acquaintance with the vice of the
cunnilingue could certainly not have been lacking, it being so familiar
a thing in his time that Aristophanes75 again and again derided it in
his Comedies. Whatever conclusion we come to on this head, at
least the passage of Hippocrates cannot justify anyone in
maintaining that the φοινικίη νοῦσος,—(Phœnician disease) was true
Elephantiasis, even if, as may be, the preliminary proposition that
elephantiasis was a consequence of debauchery be made good,—a
point to which we propose later on to return. On the subject of
Satyriasis in Crete, we have already expressed our views.
Just as the Phoenicians carried the seed of the vice to Greece and
other lands, so at a later period was it disseminated from Syria to
Italy; and so Ausonius says (Epigr. 128.):
63.
Eunus Syriscus inguinumliguritor,
Opicus76 magister (sic eum ducet Phyllis)
Muliebre membrum quadriangulum cernit:
Triquetro coactu Δ literam ducit.
De valle femorum altrinsecus pares rugas,
Mediumque, fissi rima qua patet, callem
Ψ dicit esse: nam trifissilis forma est.
Cui ipse linguam quum dedit suam, Λ est:
Veramque in illis esse Φ notam sentit.
Quid imperite, Ρ putas ibi scriptum
Ubi locari Ι convenit longum?
Miselle doctor, Ȣ tibi sit obscoeno,
Tuumque nomen Θ sectilis signet.
(Eunus from Syria, glutton of the privy parts, Opican (clownish)
master (Phyllis teaches him his letters) sees the woman’s organ four-
cornered: when compressed to a triangle he makes it out the letter
Δ. From the valley between the thighs start two furrows, a pair one
on either side, while between them is a line, where lies the opening,
the crack of the fissure; this he declares is Ψ; for ’tis three-pronged
in outline. Then when he puts in his own tongue to it, lo! it is Λ; and
he can feel there is a true Φ marked therein. What, dunce, think you
a Ρ is inscribed there, where a long Ι should by rights be placed?
Miserable, contemptible scholar, may the Ȣ (a noose) reward your
foulness, and the cleft Θ (letter of condemnation, being initial of
θάνατος,—death) be set against your name!) The more detailed
interpretation of these obscene hieroglyphics the reader may find in
the commentators on the passage, as well as in Forberg, loco citato
p. 335.
Diseases of the Cunnilingue. § 24.
Can anyone believe such a vice as this was practised without
incurring punishment? Yet there prevails amongst the Physicians of
64.
Antiquity, even includingGalen, who knew the facts, an unbroken
silence. It is impossible to suppose that girls and women could have
their genital organs purged in this mode altogether without evil
results, more particularly as actual experience in more modern times
has proved that as a consequence of the habit of cunnilingere
inflammations of the external genitals have been set up in girls, as
well as ulcerations in older women through the licking of these parts
by dogs. Among Ancient writers we have found no vouchers for this;
but on the other hand several such exist to show the mischief that
results from the habit to the cunnilingue himself. Excluding from
consideration the pale complexion77 and evil smell from the mouth,
which were equally consequences of the other forms of vice already
mentioned, we have paralysis of the tongue mentioned, at any rate
in one passage78:
Sidere percussa est subito tibi, Zoile, lingua,
Dum lingis. Certe, Zoile, nunc futuis.
(Your tongue, Zoilus, has been stricken with a sudden doom, while
in the act of licking. Why! surely, Zoilus, you copulate now). True this
malady must be counted as one of very rare occurrence; but this is
by no means the case with the ulcerations, which would seem not
always to have confined their attacks to the tongue, but to have
extended also, just as with the fellator, to the other parts of the
mouth as well. This cannot but have had the effect of making it very
difficult in diagnosis to distinguish between an affection of the sort
due to fellation and one due to the vice of the cunnilingue.
Here again it is Martial to whom we are indebted for the proofs of
our assertions. He leaves no room for doubt as to the way Manneius
was punished for his debauchery in the following passage79:
65.
L i ng u a m a r i t u s , m o e c h u s o r e M a n n e i u s ,
S u m m o e n i a n i s i n q u i n a t i o r b u c c i s :
Quem cum fenestra vidit a Suburrana
Obscoena nudum lena, fornicem claudit,
Mediumque mavult basiare, quam summum:
Modo qui p e r o m n e s v i s c e r u m t u b o s ibat,
Et voce certa consciaque dicebat:
Puer, an puella matris esset in ventre;
(Gaudete cunni, vestra namque res acta est!)
A r r i g e r e l i n g u a m n o n p o t e s t f u t u t r i c e m
N a m , d u m t u m e n t i m e r s u s h a e r e t i n v u l v a80
Et vagientes intus audit infantes,
P a r t e m g u l o s a m s o l v i t i n d e c e n s m o r b u s ;
N e c p u r u s e s s e n u n c p o t e s t , n e c i m p u r u s .
(Manneius was a husband with his tongue, a fornicator with his
mouth, a more polluted wretch than the big-cheeked wenches of the
suburbs. When a vile bawd saw him naked from a window in the
Suburra, she shuts her brothel up, and had rather kiss his middle
than his head. The man who but now could penetrate every vessel
of the inwards, and say with assured voice and certain knowledge
whether it were a boy or a girl in the mother’s belly,—rejoice,
rejoice, organs of women, for your business is done for you,—the
same cannot erect a fornicating tongue. For at the very moment he
is plunged tight in the swollen vulva, and hears the babes
whimpering within, lo! a shocking disease paralyses his greedy
tongue. Now can he be neither clean, nor yet unclean).
The Commentators, in particular Farnabius, refer the complaint
spoken of in the passage just quoted to paralysis of the tongue.
Farnabius says in fact: “Paralysisne ἀπὸ τῆς ἀφέδρου καὶ τῶν
ἐμμηνιῶν, quorum malefico humore marcescunt segetes, apes
moriuntur etc., Plin. c. 15 Lib. V., an sideratio?” (Is paralysis
intended, resulting from the menstruation and menstrual discharges,
66.
the poisonous humourof which will wither up crops, kill bees, etc.—
Pliny ch. 15. Bk. V., or a sudden stroke?) Even supposing us willing
to admit the possibility of menstrual blood bringing on paralysis of
the tongue, there can at any rate be no question of such a thing
here, inasmuch as it was with a pregnant woman Manneius carried
out his vicious practises, and women in pregnancy do not usually
menstruate,—a fact about which the Philologist naturally enough
was only imperfectly posted. Of course the possibility is always
there, although the Poet says nothing about it; and the expression
vulva tumens (swollen organ) evidently stands here, as is clearly
shown by what follows, for uterus gravidus (pregnant womb)81. The
solvere (to loose, destroy) points in any case to a destruction, a
dwindling, of the part, brought about by the indecens morbus
(shocking disease),—which disease might very likely find its
explanation in the scelerata lues (noxious contagion) mentioned on
page 258 above. As a result of this, naturally enough not only did
arrigere (to erect—the tongue) become impossible, but the impurus
(Cunnilingus) (unclean cunnilingue) grew generally incapable of
practising his vice. Nor yet was he purus (clean)82 altogether, for
was he not a cunnilingue?—and now he was even less purus,
because he suffered from the indecens morbus (shocking disease),
which even Farnabius has so far rightly understood, that he explains
nec purus (nor yet clean) by morbo illo contaminatus (because
contaminated by the said disease).
Rather more doubtful and difficult is the interpretation of the
following passage of Martial83, which would yet appear to be
pertinent here:
67.
Non dixi, Coracine,te cinaedum;
Non sum tam temerarius, nec audax,
Nec mendacia qui loquar libenter.
Si dixi, Coracine, te cinaedum,
Iratam mihi Pontiae lagenam,
Iratum calicem mihi Metili.
I u r o p e r S y r i o s t i b i t u m o r e s ,
I u r o p e r B e r e c y n t h i o s
f u r o r e s .
Quod dixi tamen, hoc leve et pusillum est.
Quod notum est, quod et ipse non negabis:
D i x i t e, Coracine, c u n n i l i n g u m.
(I never called you a cinaedus, Coracinus; I am not so rash or so
reckless, not being one to speak lies willingly. If I called you a
cinaedus, Coracinus, may Pontia’s jar be my enemy, and
Metilius’poisoned cup. I take oath by your Syrian tumours, by your
Berecynthian frenzies. What I did say is a trivial, an insignificant
thing, a thing well known, that you will not yourself deny,—I said,
Coracinus, you were a cunnilingue).
What were these Syrii tumores (Syrian tumours) that afflicted the
cunnilingue Coracinus? Beroaldus, Annotat. ch. 25., understands
them as “tumores et vibices a cultris et flagris quibus sacerdotes
Cybeles (quam deam Syriam esse volunt) se sauciabant.” (the
swellings and weals from the knives and scourges with which the
priests of Cybelé,—whom they claim to be the Syrian goddess—used
to wound themselves). Farnabius on the contrary thinks only
Berecynthios furores (Berecynthian frenzies) to be intended in this
explanation, and makes the tumores Syrii mean “ulcera et morbos
quibus credebatur irata Isis inflare peierantes,” (ulcers and maladies
with which the angry Isis was supposed to afflict false swearers),
appealing to the passage of Persius84, already brought forward a
few pages back (p. 254.), which reads:
68.
Hinc grandes Galliet cum sistro lusca sacerdos,
I n c u s s e r e D e o s i n f l a n t e s c o r p o r a, si non
Praedictum ter mane caput gustaveris alli.
(Then the tall Galli, and the one-eyed priestess with her sacred
rattle, instil terror of the gods that make men’s bodies swell, unless
three times at dawn you have eaten the prescribed head of garlic).
Whether this passage affords any direct proof would seem
doubtful, inasmuch as the inflare corpus (to make the body swell)
properly speaking only refers to the abdomen. To this also the eating
of the allium (garlic), which no doubt first won its magic significance
on account of its carminative properties, appears to point.
However another explanation is possible. Referring back to the
passage of Porphyrius quoted above on p. 254., the tumores
Coracinus had contracted in consequence of his general incontinence
with women, which incontinence had at last brought him as a senex?
(old man) to such a condition of weakness that nothing was left him
but the vice of cunnilingere to satisfy his still unexhausted lubricity. A
side light in this case may be thrown on the matter by Horace’s
description of the Anus libidinosa (The lecherous old woman) in
Epodes VIII. 9. 19.:
Venter mollis et femur
t u m e n t i b u s
Exile s u r i s additum.—Fascinum
Quod ut superbo provoces ab inguine
Ore allaborandum est tibi.
(Flabby belly and skinny thigh joined with swollen calves,—A tool,
that requires you, in order to call it up from the supercilious groin, to
work it with the mouth). Casaubon in his commentary on the
passage of Persius is for connecting this, as well as the Tumores
69.
Syrii, with ἕλκεαΣυριακὰ (Syrian sores), and—as quoted on p. 253
above—to regard them as a consequence of the wrath of the Dea
Syria (Syrian goddess). No doubt as a matter of fact the tumores
were a result of debauchery, one that was prevalent in Syria and was
disseminated thence to Rome, for they attacked a cunnilingue no
less than other debauchees; but this brings us no nearer to a
knowledge of their nature. We should perhaps be inclined to regard
them as swellings of the tonsils or of the lympathic glands of the
throat, having the same significance as the inguinal buboes in
affections of the genitals.
But what are the Berecynthii furores (Berecynthian frenzies)?
Possibly nocturnal pains in the bones, that torment a patient to the
pitch of frenzy? The metaphor, drawn from the nocturnal rites of
Cybelé, must be admitted to be a happy one. Still, however
acceptable conjectures of the sort may be to many, we cannot take
them seriously. It appears to us most judicious to regard the Syrii
tumores as being ulcerations that covered the body of Coracinus,
and by their violent itching reduced him to a state of frenzy. Our
view as stated is confirmed by Epigram 108. of Ausonius:
In scabiosum Polygitonem.
70.
Thermarum in soliosi quis Polygitona vidit
Ulcera membrorum scabie putrefacta foventem,
Praeposuit cunctis spectacula talia ludis.
Principio tremulis gannitibus aëra pulsat,
Verbaque lascivos meretricum imitantia coetus
Vibrat et obscoenae numeros pruriginis implet.
B r a c h i a d e i n d e r o t a t v e l u t e n t h e a d a e m o n e
M a e n a s ,
Pectus, crura, latus, ventrem, femora, i n g u i n a, s u r a s,
Tergum, colla, humeros luteae Symplegadis antrum.
Tam diversa locis vaga carnificina pererrat,
Donec marcentem calidi fervore lavacri
Blandus letali solvat dulcedine morbus.
Desectos sic fama viros, ubi cassa libido
Femineos coetus et non sua bella lacessit,
Irrita vexato consumere gaudia lecto:
Titillata brevi quum iam sub fine voluptas
Fervet et ingesto peragit ludibria morsu.
Turpia non aliter Polygiton membra resolvit,
Et quia debentur suprema piacula vitae,
Ad Phlegethonteas sese iam praeparat undas.
(To the scabby Polygiton.—If any man caught sight of Polygiton on
the seat of the Thermae bathing the sores on his limbs all rotten
with scab, he preferred so entertaining a spectacle to all the games.
First he beats the air with twittering, whining noises, and utters
broken sounds in imitation of the wanton embraces of harlots, and
completes the symphony of his foul-minded lechery. Then he twirls
his arms about like a Maenad under the god’s afflatus; breast, legs,
flank, belly, thighs, groin, calves, back, neck, shoulders, cave of the
bemired Symplegades,—i.e. hollow between buttocks,—in so many
different places does the shooting torture fly, until he droops and
faints in the warmth of the hot bath and the disease is soothed and
gives a fatal respite. So it is said castrated eunuchs, when barren
71.
desire tries hardfor embraces with women and for contests they
cannot properly engage in, are consumed with empty transports on
the tossed and tumbled bed,—till eventually their lust, tickled and
tickled, flames high for a last moment, and completes the wanton
act by applying the mouth and biting. So with Polygiton a final
spasm relaxes his disfigured limbs, and the last sin-offerings of his
life being due, thus makes himself ready for the waves of
Phlegethon).
True the connexion with the vice of cunnilingere is apparently lost
here, but this also may be preserved without any great straining of
the words, as we shall see presently; and accordingly the Tumores
Syrii can be quite well regarded as a consequence of the vice of the
cunnilingus.
Mentagra (Tetter of the Chin).
§ 25.
Ever since the so-called first appearance of Venereal Disease,
most of the advocates of the antiquity of the complaint have made a
point of bringing in Mentagra85 within the purview of the quotations
they adduce to prove their contention, although strictly speaking
they were never likely to succeed in a direct demonstration that the
disease was really and truly connected with sexual excesses.
Accordingly, to the present day the majority of them see in it nothing
more than a form of Leprosy, particularly as Hensler86 and Sprengel
were among those who decided in favour of its leprous character.
Instead of giving a useless list of names of the different authors,
who in former days declared for the one view or the other, we think
it more expedient to quote first of all the capital authority, a passage
in Pliny87, setting this down as it stands so as to be able afterwards
to form a correct appreciation of its bearing:
Cap. I. “Sensit et f a c i e s hominum novos omnique aevo priore
incognitos, non Italiae modo, verum etiam universae prope Europae
72.
morbos: tunc quoquenon tota Italia, nec per Illyricum Galliasve aut
Hispanias magnopere vagatos, aut alibi, quam Romae circaque: sine
dolore quidem illos ac sine pernicie vitae: sed tanta foeditate, ut
quaecunque mors praeferenda esset.
Cap. II. “Gravissimum ex his l i c h e n a s appellavere G r a e c o
n o m i n e : L a t i n e, quoniam a mento fere oriebatur, i o c u l a r i
p r i m u m l a s c i v i a (ut est procax natura multorum in alienis
miseriis) mox et usurpato vocabulo, m e n t a g r a m: occupantem in
multis totos utique vultus, oculis tantum immunibus,
descendentem88 vero et in colla pectusque ac manus, foedo cutis
furfure89.
Cap. III. “Non fuerat h a e c l u e s apud maiores patresque
nostros. Et primum T i b e r i i C l a u d i i , C a e s a r i s principatu
medio irrepsit in Italiam, quodam Perusino equite Romano
Quaestorio scriba, quum in Asia apparuisset inde contagionem eius
importante. Nec sensere id malum feminae aut servitia, plebesque
humilis, aut media: sed proceres veloci transitu osculi maxime:
foediore multorum qui perpeti medicinam toleraverant, citatrice,
quam morbo. Causticis90 namque curabatur, ni usque in ossa corpus
exustum esset, rebellante taedio. Advenerunt ex Aegypto,
g e n i t r i c e t a l i u m v i t i o r u m, medici, hanc solam operam
afferentes, magna sua praeda. Siquidem certum est, Manilium
Cornutum, e Praetoriis legatum Aquitanicae provinciae, H.S. CC.
elocasse in eo morbo curandum sese.”
(Ch. I. Moreover the human face experienced new diseases, and
such as had been unknown in any former age not merely to Italy but
to the whole of Europe very nearly, and these not widely diffused
over Italy generally, or through Illyricum or the provinces of Gaul or
of Spain, or indeed anywhere else but just in Rome and its
neighbourhood. They were painless, it is true, and did not involve
loss of life, but were of such a horrible nature that death in any form
would have been preferable.
73.
Ch. II. Themost serious of these diseases they called lichenes,—
scabs, a Greek name; in Latin, as the malady generally showed itself
first on the chin, it was known as mentagra,—chin-bane, scab or
tetter of the chin, at the first by way of jest and mockery—for it is
the nature of the multitude to make merry at others’misfortunes,—
but soon this became the recognized word. In many persons it
covered absolutely the whole countenance, the eyes alone being left
unaffected, with a horrible scurf of the skin, going down sometimes
to the neck as well, and breast, and hands.
Ch. III. This plague had not existed among our ancestors or
fathers. For the first time it crept into Italy in the middle of the reign
of Tiberius Claudius Caesar, a certain Perusinius, a Roman knight
and Quaestorian secretary, after a period of service in Asia,
importing the contagion from there. But women did not suffer from
the malady, or slaves, nor yet common folk of humble or middle-
class station; but nobles, and this particularly by the rapid infection
of an embrace. In many cases the scar, where patients had
submitted to medical treatment, was more horrible than the disease
itself. For indeed it was curable by caustics, except when the body
had been consumed to the very bones, the slowness of the
treatment defeating its own end. Physicians arrived from Egypt,
mother-land of such taints, practising this cure exclusively, to their
own great profit. If, that is, it is true that Manilius Cornutus, of the
Praetorians and governor of the Province of Aquitania, offered
200,000 sesterces for his cure when attacked by this disease).
Here if ever, it particularly behoves us to begin with an elucidation
of the meaning of the name given to the malady under discussion.
Gruner91 long ago called attention to the divergence of opinion as to
the signification of λειχῆνες (scabs) among the writers of Antiquity,
but without success in putting the actual facts in a clear light. We
must try if we can be more fortunate. An old etymologist says:
λειχὴν παρὰ τὸ λείχω, καὶ γὰρ φάσιν ἐκ τοῦ λείχειν τὸ πάθος
ἐπαίρεται92, (λειχὴν comes from λείχω,—I lick, because they say the
complaint is set up by licking). On this we may say.—there is no
74.
doubt λειχῆνες andλιχῆνες are derived from λείχειν or λίχειν, but the
explanation Kraus gives of the reason in his Lexicon we cannot think
conceivable, viz. “because Lichen, the same as a parasitic plant
does, or a skin-disease in animals, always creeps round further and
further (see Herpes,—creeping eruption), or as it were licks its way,”
for λείχειν is not so much lambere, λάπτειν,—to lick over, lick along,
as lingere, ligurire93,—to lick up, lick up greedily. At the same time it
is true the word (lambere) was used by the Romans in a somewhat
similar sense, so perhaps we ought not to refer to lambit flamma (a
flame licks), but rather to Plautus’expression (Pers. prolog. 5.),
“quorum imagines lambunt hederae sequaces” (whose images
creeping ivy-tendrils lick, i.e. entwine). Most probably there are two
different stems underlying the word. Of these one is λέγειν,—to lay,
etc., hence λέγνη, the edging, the border, λίγνυς, soot (depositing
itself on the edge), together with the bye-forms λέχω, λίχω with
which in fact λιχὴν, moss94, so far as it forms on the edge, the
surface, fringes it, would be connected. The other stem will be λίγω,
or λείγω (comp. λίβω and λείβω), λείχω and λείχην, λίγγω, λίζω, to
which would have to be referred also λίγυς and λιγυρὸς,—clear, shrill
(ligurire, lingere,—to lick greedily, to lick), in all of which the
underlying sense is of licking, and the noise connected with it.
It is plain that later on the derivatives of these stems suffered
manifold variations and corruptions; but how much of all this is to be
attributed to speakers and writers among the Greeks themselves,
and how much to subsequent transcribers and editors of their work,
it might be difficult to decide. But every day we have occasion to
note a number of words, to which accident or other circumstances
have given an ambiguous character. These, used quite
unsuspectingly by the ignorant, make the better informed person
blush, or else extort a smile from him that often enough causes the
speaker no little embarrassment to know the reason. Undoubtedly it
was the same with the Greeks and Romans, and so confusions
between λίχω and λείχω, λιχὴν and λειχὴν, might have easily arisen,
from which people were subsequently unable to extricate
75.
themselves. Originally perhapsλείχω, equally with lingo and ligurio
(to lick), may have had the simple sense of licking, and only through
later accretions to the meaning, have acquired an ambiguous
character; soon however this got transferred to it to the exclusion of
all others, and we find it used preferentially as the regular word for
cunnilingere. The correctness of our conclusion would seem to follow
above all from the passage of Aristophanes95 given below, where it
is the additional words that narrow down the meaning of λείχω (I
lick), and definitely bring out the special signification. The words are
said of Ariphrades, who reminds us of the ἀποφρὰς
(unmentionable), the name Lucian appropriates to Timarchus:
Οὐδὲ παμπόνηρος, ἀλλὰ καὶ προσεξεύρηκέ τι·
τὴν γὰρ αὑτοῦ γ λ ῶ τ τ α ν α ἰ σ χ ρ α ῖ ς ἡ δ ο ν α ῖ ς
μ α ί ν ε τ α ι ,
ἐ ν κ α σ α υ ρ ί ο ι σ ι λ ε ί χ ω ν τ ὴ ν ἀ π ό π τ υ σ τ ο ν
δ ρ ό σ ο ν,
καὶ μολύνων τὴν ὑπήνην, καὶ κυκῶν τὰς ἐσχάρας.
(Nor yet utterly villainous is he, but he has discovered yet another
device; for he polluted his own tongue with foul delights, in the
stews licking up the abominable dew, defiling the hair on the upper
lip, and tumbling the girls’nymphae).
In the following Epigram96 of an unknown author λείχω is found
used absolutely, without any supplementary words:
Χ ε ί λ ω ν καὶ λ ε ί χ ω ν ἴσα γράμματα· ἐς τί δὲ τοῦτο;
Λ ε ί χ ε ι καὶ Χ ε ί λ ω ν, κἂν ἴσα, κἂν ἄνισα.
(Χείλων,—a proper name, also means of the lips,—and λείχων,—
licking,—have the like letters; now what does this point to? Chilon
licks lips, whether lips like his own, or whether unlike). In
explanation of this Epigram Forbiger says (loco citato p. 326.):
76.
“Lusus in Chilonemcunnilingum. Hunc ait iure quodam suo lingere,
qui vel nomine iisdem literis constante prae se fert lingentem et
lingentem quidem tum labra oris, ut labris ligentis similia, tum cunni,
ut dissimilia.” (Pun on the name of Chilon, a cunnilingue. The poet
says he (Chilon) licks by a sort of inherent right of his own, who
even in his name, made up of the same letters, proclaims himself as
licking, and licking now the lips of the mouth, which are like the lips
of the licker, now those of the female organ, which are unlike).
Χεῖλος was in fact used also of the lips of a woman’s organ, the
nymphae; the Scholiast on τὰς ἐσχάρας (the nymphae) in the
passage from Aristophanes given a little above, interprets this word
by τὰ χείλη τῶν γυναικείων αἰδοίων (the lips of the female privates).
According to Schneider in his Lexicon χείλων (adj.) signifies thick-
lipped. Perhaps it was this very Epigram that led Lambert Bosius to
make the statement that χείλων arose by a mere transposition of the
letters from λείχον.
Now if λείχην,—for we consider it should be thus accented,—is
derived from λείχω (I lick), we cannot but regard it as meaning:
something produced by licking, a complaint brought on by licking,
and particularly by the licking of the cunnilingue! Surely the Greeks
could hardly have expressed themselves more clearly. Then the fact
that the name came from the mouth of the common people is the
very best reason for its not having been understood by the
educated. Yet all the while an entirely similar form of expression has
grown up in the mouth of the German common people, the real
meaning of which very few have fathomed, but which most certainly
arose in the same way as the Greek λείχην. No doubt many of my
readers have again and again heard it said of some one with an
eruption round the mouth, that is, someone suffering from Herpes
labialis (Creeping eruption of the lips): “Well! you have been
licking!”—for which educated people substitute the obviously
insufficient, “You have been picking!” Very commonly again one may
hear: “You have been licking greben, or picking greben; and this
word greben is understood as being identical with grieben,—greaves
in English, i.e. the remnants of lard that has been cut up into pieces
77.
and fried, becausethe separate pustules of the herpes labialis
resemble in appearance the greaves. So people sometimes also say
still more explicitly, “You have been licking, or picking, greaves; and
one of them has been left sticking to your mouth, to prove your
greediness!”
This explanation may seem a very likely one to many;
nevertheless we incline to believe the word to be of later origin, and
to have arisen from ignorance of the actual facts. We consider it
more probable that greben owes its origin to some corruption of
language growing out of gremium, the bosom. We have been led to
this conjecture by a statement of Adelung’s in his Dictionary, Article
“Grieben”, where he says: “In middle-Latin grieben, (greaves), were
called, in accordance with a common interchange change of the
letters b. and m. gremium”,—though indeed we cannot regard the
word as solely and entirely mediæval Latin, for it is found occurring
as early as Pliny (Hist. Nat. XII. 19.) and Columella (Res Rust. XII.
19. 3.), and is evidently connected with cremare (to burn). So just as
in this case cremium and gremium may have been used
interchangeably, has grebe grown out of greme in German, and the
latter come to be used as a synonym of griebe,—the latter words
according to this having as little in common with one another as the
former. However those better practised in the science of word
formation must here decide!
Now as to the word Mentagra (Tetter, Scab). This was evidently a
word first framed by the Romans, as is distinctly stated not alone by
Pliny, but by Galen as well (De compos. medic. secundum locos Bk.
V., edit. Kühn Vol. XII. p. 839.). The latter says: Ἐκδόριον λειχήνων·
ταύτῃ Πάμφιλος χρησάμενος ἐπὶ Ῥώμης πλεῖστον ἐπορίσατο
ἐ π ι κ ρ α τ ο ύ σ η ς ἐ ν τ ῇ π ό λ ε ι τ ῆ ς μ ε ν τ ά γ ρ α ς
λ ε γ ο μ έ ν η ς. (Blister for Lichenes (Scabs); in this way Pamphilus in
his practise at Rome made most headway against the Mentagra as it
was called, then prevalent in the city). It is usually considered to be
formed on the analogy of Podagra, Chiragra (gout of the feet, gout
of the hands) etc. from mentum, the chin, and ἄγρα, the act of
78.
catching, seizing holdof,—so a disease that attacks the chin. But
more probably all these words are compounded not with ἄγρα at all,
but with ἄλγος (suffering). That is to say just as ἀλγαλέος, by Attic
interchange of letters, becomes ἀργαλέος (grievous), κεφαλαλγία
becomes κεφαλαργία (head-ache), and ληθαλγία, ληθαργία
(drowsiness, lethargy), so from ποδαλγία we get ποδαργία, and then
by metathesis ποδάγρα (gout). (Comp. Doederlein “Lateinische
Synonyme und Etymologien”,—Latin Synonyms and Etymologies Pt.
4. p. 424.). The remark Pliny adds however “ioculari primum lascivia”
(at first by way of jesting mockery) evidently points to some
ambiguity underlying the word. But whether this consists in the
recognition of the likeness in sound between mentum, the chin, and
menta, or mentula, the virile member, or is to be looked for in the
ἄγρα, it might be difficult to determine. Still it seems probable, but
without wishing to entirely exclude the former hypothesis, that the
latter is the case, as will appear directly.
Galen97 distinguishes between λειχὴν ἁπλοῦς and λειχὴν ἄγριος
(simple lichen, and malignant lichen) in his enumeration of Skin-
diseases, and still more plainly in another place98 he says: “λειχὴν is
likewise a Skin-disease; there are two forms of it, ὁ μὲν ἥμερος καὶ
πρᾳότερος, ὁ δὲ ἄγριος καὶ χαλεπώτερος (the one benignant and
milder, the other malignant and more serious). But in both of them
minute scales are detached from the skin, and the part of the skin
underneath the scales is reddened and almost ulcerated. The
affection arises from a salt phlegmatic humour (φλέγματος ἁλμυροῦ)
and yellow gall, hence the scales fall from the skin as in glazed
pottery-ware (? ἐπὶ τῶν ἁλμῶν τῶν κεραμίων). The affection is cured
by internal phlegmagogues and external embrocations.” We have
already on p. 139. above, in the footnote on ἄγριος (wild, savage)
and χαλεπός (hard, harsh), noted how these words are used with
special reference to the vice of paederastia, but they are also applied
generally to the vice, the different forms of which we have been
examining here. This follows from Plato99 and Plutarch100, at any
rate so far as ἄγριος is concerned, which indeed we may
79.
conveniently render byvicious. The original meaning being
overlooked, λείχην and λιχὴν had been taken as synonymous,—
possibly the Latin lichenos first led to the mistake; then naturally
enough an appropriate epithet was sought, to signify the lichen
which was the result of licking in a vicious fashion. But this according
to the already existing mode of speech could be nothing else than
ἄγριος101 again,—λειχὴν ἄγριος, with which λειχὴν ἁπλοῦς, lichen
insons, (simple, innocent lichen) was naturally contrasted.
Yet while Criton, as cited in Aëtius, simply and quite correctly
interpreted Mentagra by ἄγριος λειχὴν (fierce, malignant lichen),
Galen appears to have been still ignorant of the special meaning.
This is shown by the words ἥμερος and πρᾳότερος (gentle,
benignant,—milder), which obviously are correct opposites of ἄγριος
only if the latter is understood, as it is in Celsus, as equivalent to
ferus (fierce, malignant), but in no way account for the ἁπλοῦς
(simple, innocent), which Galen no doubt found already established
as distinguishing epithet of λιχὴν. How little he fathomed the nature
of the evil, is proved by his ætiology of it, which makes the
complaint result from the φλέγμα ἁλμυρὸν (salt phlegmatic humour)
and the χολὴ ξανθὴ (yellow gall). The unprofessional Martial had a
better word to say on the subject when he wrote his sordidique
lichenes (filthy, squalid-looking lichens). Similarly it would seem the
agra in Mentagra should be taken as pointing to ἄγριος (fierce,
malignant). Can it be perhaps that in this way the μολύνων τὴν
ὑπήνην (polluting the hair on the upper lip) of Aristophanes, the
Latin barbam inquinare (to pollute the beard), have come to be used
as synonyms for cunnilingere? Martial seems to imply it by his triste
mentum, mentum periculosum (disfigured chin, perilous chin).
Perhaps too the Sycosis menti (Sycosis,—fig-like eruption, of the
chin) of Celsus and the later Greek medical writers should likewise
be regarded as coming under this head. At a matter of fact,
Archigenes says so in so many words, as cited in Galen (De comp.
med. secundum locos. Bk. V. edit. Kühn Vol. XII. p. 847.), ἐπὶ δὲ τῶν
συκωδῶν τῶν ἐπὶ τοῦ γενείου, λεγομένων δὲ μενταγρῶν, ὑπὸ δέ
τινων λειχήνων ἀγρίων, ποιεῖ κ. τ. λ. (but in the case of the sycotic,
80.
or fig-like, eruptionson the chin, which are called mentagrae, and by
others malignant lichens, he proceeds as follows, etc.), and calls the
affection of the chin, as do other Physicians, generally ἐξανθήματα
ἐν τοῖς γενείοις (efflorescences, eruptions on the chin),—p. 824.
If we have thus succeeded in establishing the meanings of lichens
and mentagra, the rest of the passage of Pliny will admit of easy
explanation. The disease in many cases it seems invaded the whole
face, in the same way as the atra lues (black contagion) in the
passages quoted above from Martial under fellation. Perhaps all of
these,—indeed, Pliny also says lues,—are the be referred, as is
actually done by Farnabius in his notes, to mentagra, seeing that the
disease could perfectly well, though certainly much seldomer, arise
equally from the practise of fellation. The double entendre between
mentum (the chin) and menta or mentula (the virile member) would
so acquire all the more point.
The expression foedo cutis furfure (with a horrible scurf of the
skin) appears to have led a number of authors to believe that this
was the capital characteristic of the complaint, and that the
distinction between λιχὴν and λείχην was merely one of degree. This
view was advocated in particular by Willian102, who ascribes it also
to Paulus Aegineta103 as well as to Oribasius104 though both of
these authors limit themselves to saying that the moderately
siccative remedies are of no benefit in λείχην ἄγριος (malignant
lichen), whereas the more violent ones aggravate it, and that for this
reason it was called ἄγριος. Hence Willian’s Lichen agrius (malignant
lichen) has nothing in common with the lichen of the Greeks and
Romans but the mere name, for it follows clearly from the words
foediore cicatrice (with a more horrible scar) that occur a little
further down in Pliny, that a process of skinning over by ulceration
was part of the disease, and did not owe its existence solely to the
caustic remedies employed.
The immunity of women105 equally admits of easy explanation, for
in the first place women were not likely to have readily conceived
81.
the idea ofacting after the manner of a cunnilingue106, and even if
fellation is admitted to be an occasionally concurrent cause of
mentagra, still it would seem, as already stated, to supervene much
less often as a consequence of the latter vice; while in cases where
it does, it is of a milder form and it is rather the internal parts of the
mouth that are imperilled. Besides, it is to be remembered that
women generally speaking suffer less frequently from pustulous
disorders of the cutaneous glands affecting the face than men do, as
is well seen at the present day with Acne. In the parts neighbouring
on the genitals this is exactly reversed. Still this immunity of women
must not be insisted on too far, as those persons of the female sex
who used to practise fellation, the Summoenianae (women of the
suburbs) lay too completely outside the range of Pliny’s observation.
As to the servi (slaves) and Plebs humilis (Commons of humble
station), these were surely unlikely, however little restraint they may
have put on their sensual appetites, to have readily fallen into
suchlike forms of vice,—forms which spring as a rule from the brain
of unoccupied, rich idlers. We have only to appeal to modern
experience to substantiate this. How many individuals of the lowest
and middle classes have the records of forensic medicine to show as
having been paederasts and so on? Wild aberrations in morals have
at no period begun with the common man! So we see it was the
Proceres (Nobles) who were in an especial degree attacked by the
mentagra.
At the same time the most conspicuous cause of mentagra, the
practice of cunnilingere was by no means the only way of getting it,
for the malady, like condylomata on the genital organs, was
evidently connected with a contagion,—a fact which is clearly
enough brought out by the layman Pliny, whereas the Physicians say
nothing about this. Accordingly the disorder was capable of being
disseminated by kissing from one individual to another. But it was
not the velox transitus osculi (swift transmission of a kiss) that was
instrumental in spreading the disease, but rather the basium
(wanton kiss),—which depended on some yet unidentified lascivious
82.
device107, sucking, playingwith the tongue or the like. Still we must
remember that at the very time the mentagra was spreading with
such terrible rapidity, a perfect mania for kissing had broken out at
Rome. Martial describes this admirably in the two following
Epigrams, which are of the very highest importance in connection
with our subject:
Book XII. Epigram 59:
De importunis basiatoribus.
Tantum dat tibi Roma basiorum
Post annos modo quindecim reverso,
Quantum Lesbia non dedit Catullo.
Te vicinia tota, te pilosus
Hircoso premit osculo colonus.
Hinc instat tibi textor, inde fullo,
Hinc sutor modo pelle basiata,
Hinc m e n t i d o m i n u s p e r i c u l o s i,
Hinc defioculusque et inde lippus,
Fellatorque recensque cunnilingus.
Iam tanti tibi non fuit redire.
(Of pestilent Kissers: Rome bestows more kisses on you, on your
return to her after fifteen years’ absence, than ever Lesbia gave
Catullus. The whole neighbourhood kisses you, and the hirsute
countryman presses you in his goaty embrace. One side the weaver
is upon you, the other the fuller, here the cobbler who but now
kissed his leather; here comes the owner of a perilous chin, here the
one-eyed man and here the blear, and the fellator, and the
cunnilingue fresh from work. Now surely to return was not of such
importance to you as all this.)
Book XI. Epigram 98:
Ad Bassum.
83.
Welcome to OurBookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookgate.com