MIDDLE WARE TECHNOLOGIES - PowerPoint PPT Presentation

About This Presentation
Title:

MIDDLE WARE TECHNOLOGIES

Description:

MIDDLE WARE TECHNOLOGIES B.TECH III YR II SEMESTER UNIT 6 PPT SLIDES TEXT BOOKS: 1.Client/Server programming with Java and CORBA Robert Orfali and Dan Harkey, John ... – PowerPoint PPT presentation

Number of Views:141
Avg rating:3.0/5.0
Slides: 34
Provided by: RAMA73
Category:

less

Transcript and Presenter's Notes

Title: MIDDLE WARE TECHNOLOGIES


1
MIDDLE WARE TECHNOLOGIES
  • B.TECH III YR II SEMESTER
  • UNIT 6 PPT SLIDES

TEXT BOOKS
1.Client/Server programming with Java and
CORBA Robert Orfali and Dan Harkey, John Wiley
Sons,SPD 2nd Edition 2. Java programming with
CORBA 3rd Edition, G.Brose, A Vogel and K.Duddy,
Wiley-dreamtech, India John wiley and sons
2
INDEX UNIT 6 PPT SLIDES
  • S.NO. TOPIC
    LECTURE NO. PPTSLIDES
  • 1.CORBA initialization protocol L41
    L1.1 TO L1.4

  • L42 L2.1 TOL 2.4

  • 2.CORBA activation services L43
    L3. 1 TO L3.3

  • L44 L4. 1 TO L4.3
  • 3. CORBAIDL mapping L45
    L5. 1 TO L5.3
  • 4. java-to-IDL mapping . L46
    L6. 1 TO L6.3

  • L47 L7. 1 TO L7.3
  • 5. The introspective L48
    L8. 1 TO L8.3
  • CORBA/Java object L49
    L9. 1 TO L9.4

3
UNIT6 SYLLABUS
  • Existential CORBA CORBA initialization protocol,
    CORBA activation services, CORBAIDL mapping CORA
    java-to-IDL mapping. The introspective CORGA/Java
    object.

4
EXISTENTIAL CORBA
  • A new service provider will first register its
    service with the trader and then provide
  • An object reference which can be used by
    clients to comment
  • The service type name methods, parameters,
    ret-type etc
  • The properties the service name value pairs
  • The trader maintains a repositiing of service
    types ex restaurant.
  • The Trader stores type descriptions in its
    service type repositing.

5
EXISTENTIAL CORBA
  • Federations Traders groups electronic basers.
  • The traders service lets you prove a search via
    policies, constraints and preferences.
  • Policies Scope of the search. Ex hop-count to
    limit the no.of trader links traversed.
  • Constraints Search criteria language can be
    specified. Ex ltltSQLgt.
  • Preferences order in which the matching offers
    are returned.
  • Ex first (default), max, min, random, with
    constraint layers- ltltSQLgtgtetc

6
EXISTENTIAL CORBA
  • Prestarting server objects before clients connect
    to them, is a costly exercise, since there could
    be millions of server objects.
  • The server side of the ORB has to provide an
    automatic startup function. The ORB should be
    able to either prestart an object or start it on
    demand, when clients invoke it.
  • It must also cooperate with a persistent service
    to save and restore the state of your server
    objects.
  • Topics covered ORB activation and deactivation
    policies by BOA Visibroken for java activation
    policies, CORBA 3.0 POA POA-EOB.

7
EXISTENTIAL CORBA
  • The CORBABOA interfacemethods to create or
    destroy obj.ref., to query or update the infn.
    The BOA maintains for an obj.
  • Create, change-implementation, get-id,
    dispose,get-principal,set-exception,
    impl-is-realy,obj-is-ready,deactivate-impl,deactiv
    ate-obj.
  • Infn to be supplied a) Interface name b)
    Implementation name 3) Some unique ref data (or
    ID) persistent ID (PID).
  • Activation policies CORBA 2.0 defines 4
    activation policies
  • a) shared server b) unshared server c)
    server-per-method and d) persistent server
  • a) BOA shared server

8
EXISTENTIAL CORBA
  • BOA activates the server the first time a request
    is invoked on any obj. implemented by that
    server.
  • The server initializes itself notifies the BOA
    impl is ready. All subsequent requests are
    then diverted to this process.
  • when the process is ready to terminate, it
    notifies BOA deactivation-impl. All the objects
    that are running with in the process are
    deactivated automatically.
  • you can also deactivate an individual object, by
    issuing deactivate object.

9
EXISTENTIAL CORBA
  • Threads are used to run multiple objects
    concurrently with in the process.
  • you can even use multiple threads to represent
    the same object to multiple clients serialize
    the access to state (data base) or treat it as a
    Java synchronized method.
  • Note make sure your ORB is thread safe
    visibroker for java is thread-safe.

10
EXISTENTIAL CORBA
  • BOA Unshared server
  • Each object in a differ.server process.
  • new server activated first time a request is
    invoked the object. It notifies BOA
    object-is-ready.
  • A new server object remains active, until
    deactivate object.
  • usage dedicated object to represent provides,
    but on a manufacturing line etc.

11
EXISTENTIAL CORBA
  • c) BOA server-per-method
  • New server for each new request.
  • Server runs only for the deviation of the
    particular method.
  • Several server processes for the same object- or
    even the same method of the same object-may be
    concurrently active.
  • No notification to BOA, when an object is
    activate or deactivated.
  • Most infrequent usage useful for running
    objects or
  • d) BOA Persistant Server

12
EXISTENTIAL CORBA
  • Servers are activated by means outside BoA.
  • impl-is-ready call is used to notify BoA.
  • Usage it is just a special case of shared
    server
  • Server activation is not by BoA
  • DBMS, ODBMS, TPMonitor or web server of all the
    time.
  • So there are good candidate apps. For the
    persistent server policy.
  • Shared server activation scenario

13
EXISTENTIAL CORBA
  • The visibroker Activation Daemon
  • CORBA 3.0s PoA
  • CORBA 2.0 client side portable but nor server
    side resulting in ORB to look after and diff.
    vendors have diff. standards.
  • CORBA 3.0 PoA June 1995- implemented is
    Visibroker for Java3.1 orbix web 3.0, and the JDK
    1.2 version of java IDL.
  • BoA PoA can consist.
  • obj. is ready replaced by connect.
  • deactivate-obj replaced by disconnect.

14
EXISTENTIAL CORBA
  • PoA
  • Transparent activations of objects, like BoA.
  • Like BoA, PoA can start
  • server prog. for each method,
  • separate prog. for each object,
  • thread prog. for all instances of an obj.type.
  • Like BoA, PoA supports both IDL-generates static
    skeletons DSI.
  • PoA supports transient or persistent objects.
  • New concepts servant mangers call back
    objects, object maps etc.
  • Server

15
EXISTENTIAL CORBA
  • PoA policies
  • Policy Type Policy Desc. Choices
  • 1. Thread ORB-CTRL-MODEL-ROOT-PoA Default
  • SINGLE-THREAD-MODEL.
  • 2. Life span TRANSIENT default
  • PERSISTENT
  • 3. Obj.id uniqueness UNIQUE ID-default
    MULTIPLE ID
  • 4. Id.Assignment USER-IDSYSTEM-ID-default
  • 5. Servant Retention RETAIN-default NON-RETAIN
  • 6. Activation IMPLICIT ACTIVATION-default
    No-
  • IMPLICIT ACTIVATION
  • 7. Request Processing USE-ACTIVE-OBJECT-MAP-ONLY-
    default,
  • USE-DEFAULT-SERVANT
  • USE-SERVANT-MANAGER

16
EXISTENTIAL CORBA
  • Different Policies Combinations
  • 1. RETAIN and USE-ACTIVE-OBJECT-MAP-ONLY
  • - good for serves that manage finite no.of
    pre-started objects.
  • 2. RETAIN and USE SERVANT MANAGER
  • - ideal for large no.of persistent objects.
  • 3. RETAIN and USE-DEFAULT-SERVANT
  • - ideal for situations where one servant is used
    per method call.
  • PoA creating object References can be exported
    to clients
  • 1. By explicitly invoking the PoAs factory
    methods.
  • - Create-reference and create-reference with id
    methods.

17
EXISTENTIAL CORBA
  • 2. Explicitly at obj. activation
  • - activate object and activate-object-with-id
    methods.
  • 3. Implicitly at obj.activation policy
    declaration.
  • Object Activation
  • 1. Explicitly, is a calls to the PoA.
  • 2. On-demand, using a servant manager.
  • 3. Implicitly policy declaration
  • PoA interfaces
  • org.omg.CoRBA, servant manager, servant
    activator, servant locator, Adapter Activator.
    PoA interface etc.

18
EXISTENTIAL CORBA
  • To support multiplatform and Multilanguage world
    of distributed clients and servers, we need
    IDL-to Java mapping.
  • The IDL-to-Java language mapping also defines an
    interface for portable stubs and skeletons that
    CoRBA vendors must support.
  • The CoRBA IDL to Java Mappings
  • CoRBA IDL Java
  • General Constructs
  • 1. Module Package
  • 2. User exceptions java class extends
    org.omg.CoRBA user
  • exception, which in twin extends java.long
    exception
  • 3. System exceptions Java class
    org.omg.CoRBA.System

19
EXISTENTIAL CORBA
  • Exception-extends java.long.RuntimeException.
  • 4. in parameters normal java parameters
  • 5. out and inout parameters Java holder classes
    (IDL generated and then
  • instantiated by client side)
  • 6. Type casts (or narrow) java helper classes
  • 7. Attributes Java overloaded accessor and
    modifier
  • methods with the same name as the attribute.

20
EXISTENTIAL CORBA
  • CoRBA IDL Java
  • Primitive Types
  • 1. Const Public static final field
  • 2. Boolean, TRUE,FALSE Boolean. True. False
  • 3. char, wchar char
  • 4. octet byte
  • 5. string, wstring java.long.string
  • 6. short, unsigned short short
  • 7. long, unsigned long int
  • 8. long long, unsigned long long long
  • 9. float float
  • 10. double double

21
EXISTENTIAL CORBA
  • Constructed Types
  • 1. interface interface
  • 2. sequence array
  • 3. array array
  • 4. struct java class with same name as struct
    type (includes instances variables and
    constructors for each field)
  • 5. enum java class with same name as enum type.
  • 6. union java class with same name as union type
    class with get/set methods for fields.
  • 7. type def java does not have a type def
    construct. Mapped to simple IDL types or user
    defined IDL types.
  • 8. ary java class org.omg.CoRBA.ary (the ORB is
    the factory)

22
EXISTENTIAL CORBA
  • CoRBA IDL Java
  • Server.side Mapp
  • 1. Server implementation using write an
    implementation class that extends
  • inheritance the IDL-generated-ltinterface-namegtI
    mpl base class.
  • 2. Server implementation using IDL-generated
    tie-ltinterface.namegtclass using delegation (i.e,
    Tie) that delegates calls to the implementation

23
EXISTENTIAL CORBA
  • class you provide. The implementation class
    implements one or more IDL-defined interfaces
    (each represented by an IDL-generated
    ltinterface-namegt operations interface)
  • 3. PoA root servant class java class
    org.omg.CoRBA.portable.object
  • Impl.pseudo.objects to java classes (only most
    frequently used are tested).

24
EXISTENTIAL CORBA
  • 1. CoRBAORB Java class org.umg.CoRBA.ORB
  • 2. CoRBAObject Java class
    org.umg.CoRBA.Object
  • 3. CoRBANamed value Java class
    org.umg.CoRBA.Named value
  • 4. CoRBANVList Java class
    org.umg.CoRBA.NVList
  • 5. CoRBARequest Java class
    org.umg.CoRBA.Request
  • (and DSI mapping)

25
EXISTENTIAL CORBA
  • 6. CoRBAServer Request(and DII) Java class
    org.umg.CoRBA.server request
  • 7. CoRBAType code Java class
    org.umg.CoRBA.Type code
  • 8. CoRBATCKind Java class org.umg.CoRBA.TCKin
    d

26
EXISTENTIAL CORBA
  • Feature CoRBA comp. JavaBeans
  • Events
  • 1. Add/remove event listeners yes yes
  • 2. Event object yes yes
  • 3. Event listener yes yes
  • 4. Too many listeners yes yes
  • (Multicast/Unicast)
  • Simple properties
  • 5. get/set single value yes yes
  • 6. get/set indexed yes yes
  • 7. is/set Boolean yes yes

27
EXISTENTIAL CORBA
  • Bound properties
  • 8. Property change event yes yes
  • 9. Property change listener yes yes
  • 10. Property change support yes yes
  • Constrained properties
  • 11. Property change Event yes yes
  • 12. Vetuable change listener yes yes
  • 13. Vetoable change support yes yes
  • 14. Property Vector Exception yes yes
  • 15. Asynchronous Veta notification yes No

28
EXISTENTIAL CORBA
  • Customization
  • 16. Property editor yes yes
  • 17. Customizer yes yes
  • 18. HTML help yes yes

29
EXISTENTIAL CORBA
  • MetaData
  • 19. Interface Reposting/IDL yes i/o
  • 20. Introspector yes yes
  • 21. BeanInfo yes, comp.Info yes
  • 22. Feature Descriptor yes yes
  • 23. Property Descriptor yes yes
  • 24. Method Descriptor yes yes
  • (Derived from the CoRBA IRs operation Def)
  • 25. Event set Descriptor yes yes
  • 26. Vensin Descriptor yes No

30
EXISTENTIAL CORBA
  • Packaging
  • 27. Serialization yes yes
  • 28. JARs yes yes
  • (Called Component Archive or CAR)

31
EXISTENTIAL CORBA
  • 29. Manifest yes yes
  • 30. Deployment Descriptor yes yes
  • 31. Installation Support yes No
  • Composition and containment
  • 32. Container yes yes, JDK 1.2 Bean
  • Context
  • 33. Containee yes yes, with JDK 1.2
  • 34. Container Listener yes yes, with JDK 1.2
  • 35. Multiple Interfaces yes, aggregation yes,
    Beans.getInstance of

32
EXISTENTIAL CORBA
  • Comp. Life Cycle
  • 36. Factories yes yes, with EJB
  • 37. Activate/deactivate yes yes, with EJB
  • 38. Persistent object refs yes yes, with EJB
  • 39. Move yes No
  • 40. Remove yes No
  • CoRBA Remote Events

33
EXISTENTIAL CORBA
  • Like JavaBean, CoRBA listeners must implement on
    Event xxx listener that extends the event
    listener interface. Similarly add/remove xxx
    listener.
  • Added.adv CoRBA event objs. Can be transmitted
    over the n/w done by pass-by-value semantics.
  • Dist.Event channel
  • CoRBA Containers Container containee
  • Useful for maintaining comp. hierarachy.
  • Ability to assemble components inside a
    container.
Write a Comment
User Comments (0)
About PowerShow.com