RMI returning EJB remote objects

260 views Asked by At

My requirement is

I have two machines, client and server. On server ONLY one port is open (which should not be JNDI port). Client needs reference of EJB remote objects which are deployed in Server, so that it can call methods on those EJB objects.

Here I am planning for RMI communication between client and server on the open port on Server. Upon getting the call server will return the EJB3 object to the client.

Here are my questions

  1. Does RMI allow to return remote EJB3 references to client?
  2. If yes, once EJB reference forwarded to the client, if client calls a method in remote EJB, using which port this communication takes place? Becausue only one port open on server ?
  3. Here is it fine to go with RMI or EJB can be used as communication? I have searched in net, but its not possible to bind an EJB to a port.
  4. Can RMI application deployed in Glassfish?

Thanks Dek

1

There are 1 answers

2
user207421 On

Does RMI allow to return remote EJB3 references to client?

Yes.

If yes, once EJB reference forwarded to the client, if client calls a method in remote EJB, using which port this communication takes place?

Whichever Piet the EJB is exported on.

Becausue only one port open on server?

Eh?

Here is it fine to go with RMI or EJB can be used as communication?

They are the same thing. The question is meaningless.

I have searched in net, but its not possible to bind an EJB to a port.

That depends on a lot of things such as whether you're using RMI/IIOP and possibly in the specific container.

Can RMI application deployed in Glassfish?

Yes.