copyright © 1998 purple technology, inc. corba and java u by alex chaffee u [email protected] u u...
TRANSCRIPT
Copyright © 1998 Purple Technology, Inc.
CORBA and JavaCORBA and Java
by Alex Chaffee [email protected] http://www.jguru.com/
Java online resources http://www.purpletech.com/
Java training and consulting
Copyright © 1998 Purple Technology, Inc.
AbstractAbstract
CORBA loves Java! CORBA provides a platform-independent, language-independent way to write applications that can invoke objects that live across the room or across the planet. Java is an object-oriented language that's ideal for writing the clients and servers living on the Object Bus. In this session, we examine the ways they interoperate programmatically, as we walk you step-by-step from a CORBA IDL, to a server and client both written in Java, running on top of a 100%-Java ORB. We also discuss the relationship between CORBA and RMI, and discuss some of the real-world issues involved in deploying a CORBA-based application. Recommended: some knowledge of CORBA, ability to read Java source code.
Copyright © 1998 Purple Technology, Inc.
IntroductionIntroduction
Purple Technology http://www.purpletech.com Java Training and Consulting
Alex Chaffee Creator of Gamelan Cool Java Dude
Copyright © 1998 Purple Technology, Inc.
Part I: CORBA OverviewPart I: CORBA Overview
Copyright © 1998 Purple Technology, Inc.
What is CORBA?What is CORBA?
Common Object Request Broker Architecture
Communication infrastructure for distributed objects
Allows a heterogeneous, distributed collection of objects to collaborate transparently
Copyright © 1998 Purple Technology, Inc.
What is CORBA good for?What is CORBA good for?
Developing distributed applications Locating remote objects on a network Sending messages to those objects Common interface for transactions,
security, etc. CORBA Services (more later)
Copyright © 1998 Purple Technology, Inc.
Why Distributed Why Distributed Applications?Applications?
Data is distributed Administrative and ownership reasons Heterogeneous systems Shared by multiple applications Scalability
Copyright © 1998 Purple Technology, Inc.
Why Distributed Why Distributed Applications?Applications?
Computation is distributed Scalability: multiprocessing Take computation to data Heterogeneous architectures
Users are distributed Multiple users interacting and
communicating via distributed applications
Copyright © 1998 Purple Technology, Inc.
Distributed Object SystemsDistributed Object Systems
All entities are modeled as objects Systems support location transparency Interfaces, not implementations, define
objects Good distributed object systems are
open, federated systems
Copyright © 1998 Purple Technology, Inc.
What is the OMG?What is the OMG?
Designers of CORBA Consortium of 700+ companies
Not including Microsoft Members:
platform vendors database vendors software tool developers corporate developers software application vendors
Copyright © 1998 Purple Technology, Inc.
It’s Just A SpecIt’s Just A Spec
Has never been fully implemented Probably never will be Industry moves quickly and spec has to
keep up Interoperability vs. portability Pass-by-value
Copyright © 1998 Purple Technology, Inc.
Basic CORBA ArchitectureBasic CORBA Architecture
Client Server
ORB ORB
request response
“Object Bus”
Copyright © 1998 Purple Technology, Inc.
CORBA ObjectsCORBA Objects
Examples Service Client Component Business object
CORBA objects approach universal accessibility Any Language Any Host on network Any Platform
Copyright © 1998 Purple Technology, Inc.
CORBA ElementsCORBA Elements
1. ORB 2. CORBA Services 3. CORBA Facilities 4. Application Objects
Copyright © 1998 Purple Technology, Inc.
ORBORB
Object Request Broker “Object Bus”
Handles all communication among objects
Each host (machine) has its own ORB ORBs know how to talk to each other ORB also provides basic services to
client
Copyright © 1998 Purple Technology, Inc.
ORB ResponsibilitiesORB Responsibilities
Find the object implementation for the request
Prepare the object implementation to receive the request
Communicate the data making up the request
Retrieve results of request
Copyright © 1998 Purple Technology, Inc.
Network of ORBsNetwork of ORBs
There’s an ORB on the server too ORB receives request
Copyright © 1998 Purple Technology, Inc.
IIOPIIOP
Internet Inter-Orb Protocol Network or “wire” protocol Works across TCP/IP (the Internet
protocol)
Copyright © 1998 Purple Technology, Inc.
ORB FeaturesORB Features
Method invocations Static and Dynamic Remote objects or CORBA services
High-level language bindings Use your favorite language; ORB translates
Self-describing Provides metadata for all objects and services
Copyright © 1998 Purple Technology, Inc.
ORB FeaturesORB Features
Local or remote Same API wherever target object lives
Preserves context Distributed security and transactions
Coexistence with legacy code Just provide a wrapper object
Copyright © 1998 Purple Technology, Inc.
What is an ORB really?What is an ORB really?
Not a separate process Library code that executes in-process Listens to TCP ports for connections
One port per local object Opens TCP sockets to other objects
N ports per remote machine
Copyright © 1998 Purple Technology, Inc.
IDLIDL
Interface Definition Language Defines protocol to access objects Like a contract Well-specified Language-independent
Copyright © 1998 Purple Technology, Inc.
IDL ExampleIDL Example
module Calc {
interface Adder {
long add(in long x, in long y);
}
} Defines an object called Adder with a
method called add
Copyright © 1997 Alex Chaffee
Stubs and SkeletonsStubs and Skeletons
Stub lives on client pretends to be remote object
Skeleton lives on server receives requests from stub talks to true remote object delivers response to stub
Copyright © 1997 Alex Chaffee
Stubs and Skeletons (Fig.)Stubs and Skeletons (Fig.)
IIOPORB
Client Host Machine
Client Object
ORB
Server Host Machine
Stub
Remote Object
Skeleton
Copyright © 1998 Purple Technology, Inc.
Client vs. ServerClient vs. Server
in CORBA, a client is a client relative to a particular object
i.e. an object with a reference to a “server” object
A client may also act as a server If it has an IDL and stubs and skeletons
Technically, a CORBA server contains one or more CORBA objects
Copyright © 1998 Purple Technology, Inc.
Different Meanings of Different Meanings of “Server”“Server”
Host machine Program running on host machine CORBA object running inside program
has IDL, stub, skeleton Sometimes called a Servant
Copyright © 1998 Purple Technology, Inc.
Stubs and Skeletons -> Stubs and Skeletons -> Platform IndependencePlatform Independence
Client code has no knowledge of the implementation of the object or which ORB is used to access the implementation.
Copyright © 1998 Purple Technology, Inc.
CORBA ServicesCORBA Services
APIs for low-level, common tasks Life Cycle Service
creating, copying, moving, removing objects
Naming Service Register objects with a name Look up objects by name
Copyright © 1998 Purple Technology, Inc.
CORBA ServicesCORBA Services
Concurrency Control Service Obtain and release exclusive locks
Transaction Service Two-phase commit coordination Supports nested transactions
Persistence Service Storing objects in a variety of databases RDBMS, OODBMS, file systems
Copyright © 1998 Purple Technology, Inc.
CORBA ServicesCORBA Services
Security Service Authentication, ACLs, encryption, etc.
Event Service Uncoupled notifications
Copyright © 1998 Purple Technology, Inc.
CORBA ServicesCORBA Services
Relationship Externalization Query Licensing Properties Time Trader Collection … and so on…
See what I mean about it never being implemented?
Copyright © 1998 Purple Technology, Inc.
CORBA FacilitiesCORBA Facilities
Frameworks for specialized applications Distributed Document Component
Facility OpenDoc
In progress: Agents Business Objects Internationalization
Copyright © 1998 Purple Technology, Inc.
N-Tier Design with CORBAN-Tier Design with CORBA
Client Tier
Business ObjectTier
ORB
ORB
ORB
ORBDB
DBORB
ORB
ORB
TP Monitor
ORB
Storage “Tier”
(after diagram in Orfali et al.)
Service “Tier”
ORB
Data Object
Copyright © 1998 Purple Technology, Inc.
Three TiersThree Tiers
User Interface Tier Business Logic Tier Data Storage Tier Can use CORBA objects in each tier
Copyright © 1998 Purple Technology, Inc.
Part II: Java IDL - Using Part II: Java IDL - Using CORBA from JavaCORBA from Java
Copyright © 1998 Purple Technology, Inc.
Java CORBA ProductsJava CORBA Products
The Java 2 ORB VisiBroker for Java OrbixWeb Netscape Communicator Various free or shareware ORBs
Copyright © 1998 Purple Technology, Inc.
Java IDLJava IDL
Should be named “Java CORBA” More than just IDL Full (?) implementation of CORBA in 100% Java
Three Parts ORB Naming Service idltojava compiler
Ships with JDK 1.2
Copyright © 1998 Purple Technology, Inc.
Transparent APITransparent API
JavaIDL turns IDL into direct method calls
Easy to program Clients have no knowledge of
implementation Highly portable
Copyright © 1998 Purple Technology, Inc.
The Java ORBThe Java ORB
100% Java Generic Allows Java IDL applications to run
either as stand-alone Java applications, or as applets within Java-enabled browsers
Uses IIOP
Copyright © 1998 Purple Technology, Inc.
Other Java ORBsOther Java ORBs
Visigenic (Inprise) VisiBroker Netscape Communicator Oracle Web Server 3.0 Free download
Iona OrbixWeb
Copyright © 1998 Purple Technology, Inc.
IDL to Java MappingIDL to Java Mapping
Defined by OMG Translates IDL concepts into Java
language constructs Everything is accessible by writing
normal-looking Java code
Copyright © 1998 Purple Technology, Inc.
IDL to Java Type MappingIDL to Java Type Mapping
IDL Type
boolean
char / wchar
octet
short / unsigned short
long / unsigned long
long long / unsigned long long
float
double
string / wstring
Java Type
boolean
char
byte
short
int
long
float
double
String
Copyright © 1998 Purple Technology, Inc.
IDL vs. Java vs. C++ IDL vs. Java vs. C++ conceptsconcepts
IDL Java C++
module package namespace
interface interface abstract
class
operation method member
function
attribute pair of pair of
methods functions
Copyright © 1998 Purple Technology, Inc.
IDL ModulesIDL Modules
Map to Java packages Unfortunately, it has the root level name of
the module Clutters up your package hierarchy e.g. module Calc ->
package Calc interface Calc.Adder not package ORG.omg.CORBA.modules.Calc
Copyright © 1998 Purple Technology, Inc.
IDL InterfacesIDL Interfaces
Map to Java interfaces
Copyright © 1998 Purple Technology, Inc.
IDL OperationsIDL Operations
Map to Java methods
Copyright © 1998 Purple Technology, Inc.
IDL AttributesIDL Attributes
Map to pair of functions IDL
string name; Java
public void name(String val); public String name();
Yes, it looks stupid. Sorry.
Copyright © 1998 Purple Technology, Inc.
idltojavaidltojava
Development tool Automatically generates java stubs,
skeletons, helpers, holders, ... Generates stubs for specific remote
interfaces
Copyright © 1998 Purple Technology, Inc.
StubsStubs
Java objects call stub methods Stubs communicate with CORBA
objects and vice versa
Transparent integration
Copyright © 1998 Purple Technology, Inc.
SkeletonsSkeletons
ORB passes request to skeleton (like a stub)
Skeleton calls local implementation
Copyright © 1997 Alex Chaffee
Remote Interfaces and Remote Interfaces and StubsStubs
IDL Interface
StubRemote Object
(Server)Client Skeleton
implements implements
extends
Copyright © 1998 Purple Technology, Inc.
Show Me The Source CodeShow Me The Source Code
OK, here it comes...
Copyright © 1998 Purple Technology, Inc.
idltojava inputidltojava input
Calc.idlmodule Calc {
interface Adder {
long add(in long x, in long y);
}
}
Copyright © 1998 Purple Technology, Inc.
idltojava outputidltojava output
idltojava Calc.idl Adder.java (a Java interface that maps the IDL interface)
_AdderStub.java (a client stub) _AdderImplBase.java (a server skeleton) AdderHelper.java (a helper class) AdderHolder.java (a holder class)
Must compile these files and put them in your CLASSPATH
Copyright © 1998 Purple Technology, Inc.
Adder.javaAdder.java
Created for you by idltojava
package Calc;
public interface Adder
extends org.omg.CORBA.Object {
int add(int x, int y);
}
Copyright © 1998 Purple Technology, Inc.
Implementing a serverImplementing a server
Extend base class Implement all methods declared in IDL
Provide a main method Create an ORB instance Create a server instance Inform the ORB about the instance Acquire a Naming Context Register the instance in that Naming Context
under some name
Copyright © 1998 Purple Technology, Inc.
AdderServer.javaAdderServer.java
class AdderServer extends _AdderImplBase
{
public int add( int x, int y ) {
System.out.println(x + " + " + y + " = " + (x+y));
return x + y;}
Copyright © 1998 Purple Technology, Inc.
AdderServer.java (cont.)AdderServer.java (cont.)
public static void main(String args[]) {
// create and initialize the ORB
ORB orb = ORB.init(args, null);
// create server and register it with the ORB
AdderServer adderRef = new AdderServer();
orb.connect(adderRef);
Copyright © 1998 Purple Technology, Inc.
AdderServer.java (cont.)AdderServer.java (cont.) // get the root naming context
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
NamingContext ncRef = NamingContextHelper.narrow(objRef);
// bind the Object Reference in Naming
NameComponent nc = new NameComponent("Adder", "");
NameComponent path[] = {nc};
ncRef.rebind(path, adderRef);
}
Copyright © 1998 Purple Technology, Inc.
Implementing a clientImplementing a client
Create an ORB Get a reference to the Naming Context Look up the correct name in that Naming
Context Receive an object reference to that object
Actually, to its Stub Invoke methods on the reference
Copyright © 1998 Purple Technology, Inc.
AdderClient.javaAdderClient.java
Copyright © 1998 Purple Technology, Inc.
Object ReferenceObject Reference
Two Meanings 1. An abstract concept referring to a specific
object living on a specific host, attached to a specific ORB
2. A local Java reference to an object that relays messages to that object
Obtained from new keyword a Factory Object the Naming Service
Copyright © 1998 Purple Technology, Inc.
Naming ServiceNaming Service
tnameserv t is for “transient”
Maps name to object reference An implementation of the CORBA Object
Service (COS) name service to run the Naming Service
UNIX: tnameserv & Win32: start /m tnameserv
Copyright © 1998 Purple Technology, Inc.
Fire it upFire it up
start /m tnameserv start java AdderServer java AdderClient 2 + 2 = ?
Copyright © 1997 Alex Chaffee
CORBA FlowCORBA FlowClient Virtual Machine
Client
Server Virtual Machine
Stub
Remote Object
Skeleton
Name Server Virtual Machine
“Fred”
Server
Copyright © 1997 Alex Chaffee
CORBA FlowCORBA FlowClient Virtual Machine
Client
Server Virtual Machine
Stub
Remote Object
Skeleton
Name Server Virtual Machine
“Fred”
Server
1
2
1. Server Creates Remote Object2. Server Registers Remote Object
Copyright © 1997 Alex Chaffee
CORBA FlowCORBA FlowClient Virtual Machine
Client
Server Virtual Machine
Stub
Remote Object
Skeleton
Name Server Virtual Machine
“Fred”
Server
4
3. Client requests object from Name Server4. Name Server returns remote reference(and stub gets created)
3
Copyright © 1997 Alex Chaffee
RMI FlowRMI FlowClient Virtual Machine
Client
Server Virtual Machine
Stub
Remote Object
Skeleton
Name Server Virtual Machine
“Fred”
Server
6
5. Client invokes stub method6. Stub talks to skeleton7. Skeleton invokes remote object method
5 7
Copyright © 1998 Purple Technology, Inc.
Pseudo-objectsPseudo-objects
The ORB is a pseudo-object It works just like a remote object, only
it’s local
Copyright © 1998 Purple Technology, Inc.
The Basic Object Adapter The Basic Object Adapter (BOA)(BOA)
Another pseudo-object Helps register objects with the ORB Functions
Maintain Implementation Repository Generate and interpret object references Activate and deactivate implementation
objects Invoke methods via skeletons
Copyright © 1998 Purple Technology, Inc.
Why do you need both an Why do you need both an ORB and a BOA?ORB and a BOA?
I’m not really sure Allows vendors to optimize or enhance
functionality register many objects en masse cache object state elsewhere
E.g. Object database
Copyright © 1998 Purple Technology, Inc.
Using the BOAUsing the BOA
Slightly different procedure for initializing objects
Hides name service from you Ask the BOA to register the object Ask the Helper object to bind the object
Once the object is created, interface is identical Just call methods using normal Java syntax
Copyright © 1998 Purple Technology, Inc.
BOA Object ActivationBOA Object Activation
Shared server Multiple objects, one server Normal procedure Multithreaded (handled by CORBA
implementation) Unshared server
New process for each object
Copyright © 1998 Purple Technology, Inc.
BOA Object Activation BOA Object Activation (cont.)(cont.)
Server-per-method Batch processing
Persistent server Shared server, but object not created by
ORB
Copyright © 1998 Purple Technology, Inc.
BOA Object Activation BOA Object Activation ScenarioScenario
Server creates object instance obj = new MyObject();
Server registers object with BOA boa.create(interface_name,
implementation_name, reference_data) VisiBroker does this for you in superclass
constructor
Copyright © 1998 Purple Technology, Inc.
BOA Object Activation BOA Object Activation Scenario (cont.)Scenario (cont.)
Server tells BOA the object is ready boa.obj_is_ready(obj)
Server tells BOA that all objects are ready boa.impl_is_ready()
Objects shut down boa.deactivate_obj(this)
Server shuts down boa.deactivate_impl()
Copyright © 1998 Purple Technology, Inc.
Threads in JavaIDLThreads in JavaIDL
Remote invocations happen on a separate thread
Must make sure your remote objects are thread-safe
Copyright © 1998 Purple Technology, Inc.
CallbacksCallbacks
Pass in a reference to some CORBA object
The server object can invoke methods on that reference
ORB automatically generates a stub on the server side
The server has become the client, and vice versa
Copyright © 1998 Purple Technology, Inc.
Obtaining Object Obtaining Object ReferencesReferences
From the ORB orb.resolve_initial_references(“NameService
”) From a Naming Context From a Stringified reference From another object From a parameter to your remote method
Copyright © 1998 Purple Technology, Inc.
Helper ObjectsHelper Objects
How CORBA does casting narrow method changes the type of an
object reference// get the root naming context
org.omg.CORBA.Object objRef =
orb.resolve_initial_references("NameService");
NamingContext ncRef = NamingContextHelper.narrow(objRef);
Copyright © 1998 Purple Technology, Inc.
Naming ContextsNaming Contexts
Directory structure for CORBA Naming Component = file Naming Context = directory Can add a Context as a Component
like subdirectories Can add a Context on a different name
server like symbolic links
Copyright © 1998 Purple Technology, Inc.
StringificationStringification
Stringified reference is ORB-independent Object to string
org.omg.CORBA.Object obj = ...
String str = orb.object_to_string(obj);
String to object org.omg.CORBA.Object obj = orb.string_to_object(str);
Copyright © 1998 Purple Technology, Inc.
Visigenic: CaffeineVisigenic: Caffeine
Java to IDL compiler
Copyright © 1998 Purple Technology, Inc.
Symantec: Visual Café 3.0 Symantec: Visual Café 3.0 Enterprise SuiteEnterprise Suite
Java to IDL compiler Automatic client adapter bean
generation Makes a JavaBean that’s a proxy to a
CORBA object Distributed debugging
Follow call chain, examine variables, et al. Across many VMs, many hosts, many OSs
Copyright © 1998 Purple Technology, Inc.
Part III: Example Part III: Example ApplicationApplication
Copyright © 1998 Purple Technology, Inc.
Publish-Subscribe SystemPublish-Subscribe System
Channel: an avenue for real-time data exchange
Consumers can subscribe to arbitrary data channels
Producers can publish data on channels Invokes callback method on consumer
Copyright © 1998 Purple Technology, Inc.
Object ModelObject Model
PSServer Channel getChannel(String channelName)
creates channel if it doesn’t already exist
Channel void subscribe(Subscriber sub) void publish(Object data)
Subscriber void dataArrived(Object data)
Copyright © 1998 Purple Technology, Inc.
Flow: Subscriber-sideFlow: Subscriber-side
Client acquires PSServer reference Client acquires channel from PSServer Client creates subscriber locally, passing
reference to channel Subscriber registers self with channel
channel.subscribe(this) Client waits for callback to its dataArrived
method
Copyright © 1998 Purple Technology, Inc.
Flow: Publisher-sideFlow: Publisher-side
Client acquires PSServer reference Client acquires channel from PSServer Client creates publisher locally, passing
reference to channel Publisher acquires data
From a database From a data feed
Publisher calls channel.publish(data)
Copyright © 1998 Purple Technology, Inc.
Example Application: Stock Example Application: Stock datadata
Channel name = stock symbol name Source code available
Copyright © 1998 Purple Technology, Inc.
Design issuesDesign issues
Name space for channels TIBCO et al. use hierarchical directory
structure Caching prior messages
Subscribe should spawn a thread that sends previous N messages
Copyright © 1998 Purple Technology, Inc.
Design issuesDesign issues
Maintain local cache of data sent Don’t want to go back across the network
every time you draw a graph Create local version of class
Copyright © 1998 Purple Technology, Inc.
Part IV: Advanced TopicsPart IV: Advanced Topics
Copyright © 1998 Purple Technology, Inc.
ExceptionsExceptions
CORBA exceptions are mapped to Java exceptions
System Exceptions They’re subclasses of RuntimeException, so the
compiler won’t complain if you forget to catch them Minor codes
additional information
vendor-specific :-( Completion Status
Copyright © 1998 Purple Technology, Inc.
Exceptions (cont.)Exceptions (cont.)
User Exceptions Generated by idltojava Subclasses of Exception (declared)
Copyright © 1998 Purple Technology, Inc.
Dynamic Invocation Interface Dynamic Invocation Interface (DII)(DII)
CORBA is fully self-aware Methods for acquiring
List of all services List of known objects Interfaces of known objects Etc.
Well-documented elsewhere
Copyright © 1998 Purple Technology, Inc.
Interface RepositoriesInterface Repositories
JavaIDL clients do not typically need or use an Interface Repository
All of the needed type information is available in the stubs or is resolved by an object's server
JavaIDL supports access to Interface Repository information made available by other CORBA object implementations.
Copyright © 1998 Purple Technology, Inc.
Implementation RepositoryImplementation Repository
contains information that allows the ORB to locate and activate implementations of objects
also store additional information associated with implementations of ORB objects.
Debugging information Administrative control Resource allocation Security
Copyright © 1998 Purple Technology, Inc.
Value ObjectsValue Objects
CORBA 3.0 Blobs Avoids network latency of pass-by-
reference objects
Copyright © 1998 Purple Technology, Inc.
RMI over IIOPRMI over IIOP
In Development Uses IIOP as transport protocol Uses Value Objects to pass Java
serialized objects
Copyright © 1998 Purple Technology, Inc.
CORBA via RMICORBA via RMI
Possible using middleware server RMI from client to middleware IIOP from middleware to other servers Can use Servlet as middleware
Copyright © 1998 Purple Technology, Inc.
CORBA and EJBCORBA and EJB
Transport EJB uses RMI interface, RMI uses IIOP
CORBA 3.0 promises object compatibility with EJB Not quite sure what that means
Some EJB Servers contain an ORB All EJB Objects are also CORBA objects
Copyright © 1998 Purple Technology, Inc.
CORBA and EJB (Cont.)CORBA and EJB (Cont.)
All EJB Servers use CORBA Transactions (via JTS) That means that any client can make a
distributed transaction that includes both CORBA and EJB Objects
Not an either-or decision You can have both EJB and CORBA
working together in a single system
Copyright © 1998 Purple Technology, Inc.
Java TransactionsJava Transactions
Java Transaction Service (JTS) A standard Java mapping of the OMG Object
Transaction Service (OTS) packages org.omg.CosTransaction and
org.omg.CosTSPortability
Java Transaction API (JTA) High-level transaction management specification package javax.transaction class UserTransaction
Copyright © 1998 Purple Technology, Inc.
Object Transaction Service Object Transaction Service (OTS)(OTS)
Distributed transaction specification Part of CORBA, but also standalone Transactions can span
multiple queries multiple objects multiple servers multiple databases multiple vendors’ products
Copyright © 1998 Purple Technology, Inc.
OTS FeaturesOTS Features
Distributed transactions Flat or nested transactions Two-phase commit Vendor interoperability (?)
Copyright © 1998 Purple Technology, Inc.
OTS Object ModelOTS Object Model
Transactional Object Can participate in a transaction
Recoverable Object Actually performs commit or rollback on its own
data
Resource A system or server that can commit or rollback
data stored inside it E.g. a database server
Copyright © 1998 Purple Technology, Inc.
OTS Object Model (Cont.)OTS Object Model (Cont.)
Current Reference/wrapper to currently active transaction
Control / Coordinator / Terminator Registers objects Performs distributed commit/rollback
Synchronization An object that gets informed of the progress of the
ongoing transaction Implements callback methods
Copyright © 1998 Purple Technology, Inc.
Part V: CORBA/Java Case Part V: CORBA/Java Case StudiesStudies
Copyright © 1998 Purple Technology, Inc.
CORBA Case StudyCORBA Case Study
Kaiser Permanente Northern California KAHUNA a/k/a WebChart http://www.javaworld.com/jw-11-1998/
jw-11-kaiser.html?101698txt
Copyright © 1998 Purple Technology, Inc.
Problem: SpecificProblem: Specific
Medical records, patient histories, clinical schedules, lab results, and medical images all stored in disparate databases
Many patients per doctor, many doctors per patient
Need immediate access to all information
Copyright © 1998 Purple Technology, Inc.
Problem: GeneralProblem: General
getting data from a multitude of sources in a multitude of media
putting data into a single system
distributing data to a wide variety of desktops throughout a very large company
Copyright © 1998 Purple Technology, Inc.
Solution: Java/CORBASolution: Java/CORBA
“Not only did Java/CORBA solve all these problems, but Java/CORBA development is cheap, fast, scalable and works over the Internet.”
Copyright © 1998 Purple Technology, Inc.
WebChart ArchitectureWebChart Architecture
Copyright © 1998 Purple Technology, Inc.
This is your brain on Java.This is your brain on Java.Any questions?Any questions?
Copyright © 1998 Purple Technology, Inc.
ConclusionConclusion
Copyright © 1998 Purple Technology, Inc.
Where to Get More Where to Get More InformationInformation
Orfali & Harkey, Client/Server Programming with Java and CORBA (Wiley)
Orfali, Harkey & Edwards, Instant CORBA (Wiley)
Copyright © 1998 Purple Technology, Inc.
More Info: LinksMore Info: Links
This Presentation http://www.purpletech.com/
JDK 1.2 CORBA documentation http://java.sun.com/products/jdk/1.2/docs/guide/idl/
Glerum, WebChart serves up Kaiser patients, JavaWorld
http://www.javaworld.com/jw-11-1998/jw-11-kaiser.html?101698txt
Copyright © 1998 Purple Technology, Inc.
More Info: LinksMore Info: Links
Object Management Group - http://www.omg.org Java Transactions
http://java.sun.com/products/jta/ http://java.sun.com/products/jts/ ftp://www.omg.org/pub/docs/formal/97-12-17.pdf