RMIIIOP and JNDI - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

RMIIIOP and JNDI

Description:

Java Remote Method Invocation over Internet Inter-ORB Protocol. Mechanism that allows objects to ... Conversion of a Java object into a bit-blob representation ... – PowerPoint PPT presentation

Number of Views:87
Avg rating:3.0/5.0
Slides: 9
Provided by: tklak
Category:
Tags: jndi | rmiiiop | blob

less

Transcript and Presenter's Notes

Title: RMIIIOP and JNDI


1
RMI-IIOPandJNDI
Celsina Bignoli bignolic_at_smccd.net
2
Java RMI-IIOP
  • Java Remote Method Invocation over Internet
    Inter-ORB Protocol
  • Mechanism that allows objects to communicate
    across a network
  • Special version of RMI, compliant with CORBA
  • Uses java.rmi and javax.rmi packages

3
Remote Interface
  • separation between
  • Interface exposes to the client what methods can
    be invoked on an object and what are their
    parameters
  • Implementation the programming logic provided by
    the object
  • in RMI-IIOP, need to define a Remote Interface
    which extends java.rmi.Remote

4
Remote Object Implementation
  • Implements the remote interface
  • To allow remote clients to invoke its methods,
    must either
  • Extend javax.rmi.PortableRemoteObject
  • Be manually exported using javax.rmi.PortableRemot
    eObject.
  • exportObject()

5
Location transparency
  • RMI-IIOP masks weather the object you are
    invoking is local or remote
  • Uses a stub to accept method calls locally and
    delegate those calls to the actual object
    implementation which might reside across the
    network
  • Uses a skeleton on the remote host to receive
    calls over the network and delegate the calls to
    the object implementation.
  • Stubs and skeletons are automatically generated
    by a tool, called rmic, provided as part of the
    Java RMI-IIOP implementation

6
Stubs and Skeletons
Client
Implementation Object
Remote Interface
Remote Interface
Stub
Skeleton
Network
7
Object Serialization
  • Conversion of a Java object into a bit-blob
    representation
  • Must implement the java.lang.Serializable
    interface (marker interface, no methods)
  • Rules for member variables
  • All primitive types are serializable and will be
    serialized unless marked as transient
  • Objects marked as transient will not be
    serialized
  • Objects not marked as transient must be
    Serializable

8
RMI-IIOP and Object Serialization
  • Java RMI-IIOP uses serialization for passing
    parameters via remote method invocation.
  • A parameter is serialized and passed by-value
  • Java RMI-IIOP can also simulate
    pass-by-reference.
  • The parameter must be declared as a remote object
  • The stub for the remote object is serialized and
    passed by-value.
Write a Comment
User Comments (0)
About PowerShow.com