corba on the web - gbv

11
Corba on the Web Ron Ben-Natan McGraw-Hill New York San Francisco Washington, D.C. Auckland Bogota Caracas Lisbon London Madrid Mexico City Milan Montreal New Delhi San Juan Singapore Sydney Tokyo Toronto

Upload: others

Post on 20-Apr-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Corba on the Web - GBV

Corba on the Web

Ron Ben-Natan

McGraw-Hill

New York San Francisco Washington, D.C. Auckland Bogota Caracas Lisbon London

Madrid Mexico City Milan Montreal New Delhi San Juan Singapore Sydney Tokyo Toronto

Page 2: Corba on the Web - GBV

Contents

Foreword xvü

List of Acronyms xix

Chapter 1 Interoperable Webs l

The History of the Internet 3 The History of the World Wide Web 6

The Internet and the WWWToday 9 The Object Management Group 9 A Crash Course in Object Technology 12

First Principles 12 Objects 14 Classes 15 Methods and Messages 17 Encapsulation and Modularity 17 Abstraction 17 Inheritance and Subtyping 18 Polymorphism 19 Dynamic Binding 20 Software Reuse, ICs, and Components 21 Frameworks 22 Design Patterns 22 Object-Oriented Distributed Systems 24

Chapter 2 Java-The Environment 27

Java—The Language 28 Java Language Features 30 The Java System Architecture 34

Just-In-Time Compilers 37 The Java Development Kit QDK) and the Java Runtime Environment ORE) • • • • 37 JavaBeans 41 The JavaOS 43

The Java Virtual Machine A4

vii

Page 3: Corba on the Web - GBV

viii Contents

Java Bytecodes 44 JVM Execution 45 JVMThreads 47 The Class File Format 48 Class File Verification 49

Chapter 3 Elements of the Java Programming Language 51

Java Applets 53 The Applet Class 54 Reading Applet Parameters 57 Applet Restrictions 57

The Java Thread Model 58 Thread Synchronization 60 Thread Groups 61

Java Exceptions 62 Java Streams 64 Networking in Java 66

TCP/IP 67 Sockets 68 Socket Programming in Java 68 Internet Protocols 70 The Hypertext Transfer Protocol (HTTP) 71 URIs, URLs, and URNs 71 URLs in Java 73

The Java Reflection API 73 Methods Added to Class Class 74 Important Methods in the Member Interface 75

Chapter 4 CORBA—The Architecture 77

The Object Management Architecture 78 The OMA Reference Model 79 The Object Request Broker 81 Object Services 81 Common Facilities 82

The OMG Object Model 82 Objects and Types 85 Objects and Non-Objects 86 Operations 87

Page 4: Corba on the Web - GBV

Contents ix

Subtyping and Inheritance 87 The CORBA Object Model (CORBA/OM) 88

Requests 88 Operations 88

Interfaces andAttributes 89 Types 90 Implementations 90

The Common Object Request Broker Architecture 90 The ORB Core 92 IDL Stubs and Skeletons 93 Object Adapters and the ORB Interface 93 Repositories 94 Object References 94 Clients 95 Object Implementations 95 Object Adapters 95

The Interface Definition Language 96 The Dynamic Invocation Interface 97 Dil Structures 97 Requests 98 The Deferred Synchronous Model 98

Context Objects 99 The Interface Repository 99

The Structure of an Interface Repository 100 IR Containers 101

The ORB Interface 103 Object References and Strings 103 Operations on Object References 103

The Basic Object Adapter 104

Chapter 5 MOP—Internet Interoperability 107

ORB Interoperability 110 Domains 113 The Dynamic Skeleton Interface 113 Inter-Domain Referencing 115 Interoperable Object References 116 ORB Services 117

The General Inter-ORB Protocol 119

Page 5: Corba on the Web - GBV

x Contents

The Common Data Representation 120 GIOP Messages 121

The Internet Inter-ORB Protocol 123

Chapter 6 CORBA IDL and the Java Mapping 125

CORBA IDL 128 IDL Preprocessing 130 IDL Modules 130 IDL Interfaces 132 IDL Types 132 IDL Exceptions 134 IDLAttributes 135 IDL Operations 136

The IDL/java Mapping 137 IDL-to-Java 138 Modules 138 Interfaces 138 Types 138 Exceptions 140 Operations 141 Pseudo Objects 141

IDL and C++ 143

Chapter 7 Java ORBs 147

The Example 148 The IDL 151 Stubs and Skeletons 152

Client-Side Stubs 156 Implementation Skeletons—The Boalmpl Approach 160 Implementation Skeletons—The TIE Approach 163

The Example Applet 164

Chapter 8 CORBA Services—Part 1 169

The Object Services Architecture and the Object Services Roadmap 171 Services Overview 173 The Naming Service 176

The Naming Module 177

Page 6: Corba on the Web - GBV

Contents xi

Names Library 177 The Event Service 178

The EventComm Module 179 Event Channels 180 TheTypedEventComm Module 182 Typed Event Channels 183 Composing Event Channels 183

The Life Cycle Service 183 Object Creation 185 Object Deletion 186 Moving and Copying Objects 186 Factories and Factory Finders 186 Object Graphs 188

The Persistence Service 189 The PSM DDL 190 The PSM Model 190 PSM Interfaces 192

Chapter 9 CORDA Services—Part 2 195

The Object Relationship Service 195 Relationships 198 Object Graphs 201 Containment and Reference 202 Relationships versus Object References 203

The Object Externalization Service 204 Object Externalization 205 Object Internalization 208

The Object Transactions Service 209 Service Structure 211 Transaction Service Components 213 The Transactions Module 214

The Concurrency Control Service 215 The Query Service 215

The Property Service 217 The Licensing Service 217 The Time Service 218 The Trading Service 218

Page 7: Corba on the Web - GBV

xii Contents

Chapter 10 CORBA Security 219

Cryptography 221 CORBA Security at a Glance 224 The CORBA Security Model 225

Principals 226 Secure Invocations 226 Access Policies 227 Auditing 228 Delegation 228

Security Interfaces 229 Level 2 Application View 229 View of Objects Implementing Security 237 Interceptors 240

The Secure Inter-ORB Protocol 241

Chapter 11 Java Security 243

The Java Security Model 245 The Java Sandbox 246 The Class Loader 247 The Verifier 249 The Security Manager 250 Applet Security 254 JDK 1.1 Security 256 JDK 1.1 Security Packages 256 JAR Files 258 The javakeyTool 259

The Java Cryptography Architecture 260 Engine Classes 261 Providers 262 Classes 262

JDK 1.2 Security 264

Chapter 12 Web Security, SSL, and CDSA 267

The Netscape Security Blueprint 268 Microsoft's Security Blueprint 269 S/MIME 270

Page 8: Corba on the Web - GBV

Contents xiii

Secure HTTP (S-HTTP) 271 The Secure Electronic Transactions Specification 272 The Secure Socket Layer 273

The SSL Protocol 275 SSL and CORBA Security 278 SSLeay 279 SSL and Java 279 SSL and Firewalls 280

The Common Data Security Architecture 281 CDSA Layered Architecture 282 The Common Security Services Manager 282 Cryptographic Services 284 Trust Policy Services 285 Certificate Library Services 286 Data Storage Services 287

Chapter 13 Firewalls 289

Internet Firewalls 290 Types of Firewalls 290 Packet Filtering 291 Proxy Servers 291 SOCKS 292 Firewall Architectures 293

FireWall -1 295 OPSEC 296 Stateful Inspection 296 Security Policy Management 297 Authentication 297 Network Access Translation 298 Encryption 298 Content Security 299 Connection Control 300 Router Management 300

Java Firewalls 300 Finjan Software 301

HOP Firewalls 302 HTTPTunneling of HOP 303 HOP Proxy Server 304

Page 9: Corba on the Web - GBV

xiv Contents

WonderWall 304 Proxification 305 WonderWall Configuration 306 The WonderWall HTTP Server 308 Callbacks 308

Appendix OrbixWeb Programming 311

The Interface Definition Language 312 IDL Interfaces 312 Oneway Operations 313 Context Clause 314 Modules 315 Exceptions 315 Inheritance 316 The Basic Types of IDL 318 Constructed Types 319 Arrays 320 Template Types 321 Constants 322 Typedef Declaration 322 Scoped Names 323 The Preprocessor 323 Pseudo Types 324

IDL-to-Java Mapping 325 Overview of the Mapping 325 Mapping for Identifiers 326 Scoped Names 326 The CORBA Module 326 Mapping for Basic Data Types 327 Mapping for Interfaces 328 Mapping for Attributes and Operations 334 Object References 337 Inheritance 339 Mapping for Constants 343 Mapping for Enums 345 Mapping for Strings 345 Mapping forTypedefs 347 Mapping for Structs 348

Page 10: Corba on the Web - GBV

XV

Mapping for Unions 349 Mapping for Arrays 351 Mapping for Sequence Types 351 Mapping for Exception Types 353 Context Arguments 355 Common Mapping for Pseudo Types 356 Mapping for Parameters and Return Values 357

Programming OrbixWeb Using Java 361 Files Generated by the IDL Compiler 363 A Client Program 364 The Server: Implementing Interfaces 368 The Server: Coding the Implementation Classes 370 The Server: mainO Method And Object Creation 377 Registration andActivation 381 Execution Trace 382 Comparison of the TIE and BOAImpl Approaches 385 An Example of Using Holder Classes 387

Publishing Object References in Servers 389 Object Identification 389 Making Object References Available to Clients 393

Retrieving Object References in Clients 397 Binding to Objects in OrbixWeb Servers 397 Using Object Reference Strings to Create Proxy Objects 403 Resolving Names in the Naming Service 404

ORB Interoperability 405 Overview of GIOP 406 HOP in OrbixWeb 408

Exception Handling 418 User-Defined Exceptions 418 System Exceptions 420 The Client: Handling Exceptions 421 The Server:Throwing an Exception 423

Inheritance 424 Single Inheritance of IDL Interfaces 425 Multiple Inheritance of IDL Interfaces 433

Contexts 435 Creating a Context 435 Retrieving Property Values from a Context 436

Page 11: Corba on the Web - GBV

XVI Contents

Type any 437 Using Insertion Methods to Construct anAny 438 Using Extraction Methods to Interpret anAny 441 Inserting and Extracting Array Types 443 Any Constructors andAdditional Methods 443 Any as a Parameter or Return Value 444

Dynamic Invocation Interface 444 Example 445 Using the Dil 446 Using the DU: CORBA-Based Approach 448 Deferred Synchronous Invocations 458 Using Filters with the Dil 459

References 461 Index 467