org.objectweb.easybeans.rpc.rmi.server
Class RMIServerRPCImpl

java.lang.Object
  extended by javax.rmi.PortableRemoteObject
      extended by org.objectweb.easybeans.rpc.rmi.server.RMIServerRPCImpl
All Implemented Interfaces:
java.rmi.Remote, RMIServerRPC

public class RMIServerRPCImpl
extends javax.rmi.PortableRemoteObject
implements RMIServerRPC

Server side object which handle the EJB requests.

Author:
Florent Benoit

Field Summary
private  Embedded ejb3server
          Server on which it depends.
private static int WAIT_TIME
          Retry time when container is not available.
 
Fields inherited from interface org.objectweb.easybeans.rpc.rmi.server.RMIServerRPC
RPC_JNDI_NAME
 
Constructor Summary
RMIServerRPCImpl(Embedded ejb3server)
          This invoker will discuss with the embedded server when receiving requests.
 
Method Summary
 EJBResponse getEJBResponse(EJBRequest request)
          Handle a request and send back a response.
It finds the right container and its factory and send the request to the factory.
 
Methods inherited from class javax.rmi.PortableRemoteObject
connect, exportObject, narrow, toStub, unexportObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ejb3server

private Embedded ejb3server
Server on which it depends.


WAIT_TIME

private static final int WAIT_TIME
Retry time when container is not available.

See Also:
Constant Field Values
Constructor Detail

RMIServerRPCImpl

public RMIServerRPCImpl(Embedded ejb3server)
                 throws java.rmi.RemoteException
This invoker will discuss with the embedded server when receiving requests.

Parameters:
ejb3server - the server on which send requests.
Throws:
java.rmi.RemoteException - if RPC fails
Method Detail

getEJBResponse

public EJBResponse getEJBResponse(EJBRequest request)
                           throws java.rmi.RemoteException
Handle a request and send back a response.
It finds the right container and its factory and send the request to the factory.

Specified by:
getEJBResponse in interface RMIServerRPC
Parameters:
request - the ejb request to handle.
Returns:
a response.
Throws:
java.rmi.RemoteException - if there are errors on the prococol.