Online Hibernate Training just in Rs. 1000

One week online training in Hibernate ORM framework. Learn Hibernate Framework and enhance your skills. Best Online Hibernate training at 90% discount. Join Now!! Offer is valid Only for limited Period!!! Online Training

Java Remote Interface

The Remote interface identifies interfaces whose methods may be invoked remotely from a non-local virtual machine.

Ads

Java Remote Interface

     

The Remote interface identifies interfaces whose methods may be invoked remotely from a non-local virtual machine. Any remote object must directly or indirectly implement this interface. Implementation classes can implement any number of remote interfaces and can extend other remote implementation classes.

The methods specified in a "remote interface", extends java.rmi.Remote. Therefore, these methods must be defined as being capable of throwing a java.rmi.RemoteException. This exception is thrown by the RMI system from a remote method invocation to indicate that either a communication failure or a protocol error has occurred.

The Enterprise Java Bean (EJB) 2.0 specification also contains a remote client view in cases when you plan to use the bean in distributed environments.

To access a remote object, you first need to find it, which can usually be accomplished through the use of a directory or naming service, such as the RMI registry or JNDI

When you obtain a reference to a remote object through a directory service, you don't receive an actual reference to that object, but rather a reference to a stub object that implements the same interface as the remote object. The stub marshals the method parameters and converts them into a byte-stream representation. Then it sends the marshaled parameters over the network to a skeleton object, which unmarshals them and invokes the actual remote method you wanted to invoke. Then the method returns a value to the skeleton, the skeleton marshals the return value and transports it to the stub, and the stub unmarshals it and returns the value to the caller.

 

Read example at:

http:/www.roseindia.net/javabeans/sessionbeantutorial.shtml

 

Advertisements

Ads
Share on Google+Share on Google+

Java Remote Interface

Posted on: June 19, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Java Remote Interface  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:1
deepak kumar sana
March 20, 2013
java programming lanuage

for learning

Ads

 

Ads