1 / 8

RMI-IIOP and JNDI

RMI-IIOP and JNDI. Celsina Bignoli bignolic@smccd.net. 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.

aulani
Download Presentation

RMI-IIOP and JNDI

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RMI-IIOPandJNDI Celsina Bignoli bignolic@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.PortableRemoteObject. 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.

More Related