Tor-Morten
Tor-Morten

Reputation: 1532

RMI, EJB and callback

Is it possible for a client to pass an RMI object as an argument to an EJB so that the EJB may callback the client?

Upvotes: 4

Views: 1301

Answers (2)

Nick Holt
Nick Holt

Reputation: 34311

You'd need to pass the connection details in the call to the EJB and have the EJB make a connection to the client-side RMI server.

My advise would be to use messaging and a temporary queue for the asynchronous behaviour it sounds like you're trying to achieve...

Upvotes: 3

Robin
Robin

Reputation: 24262

No. Remote objects cannot be serialized and moved to other locations, since the connection to the remote object itself is transient in nature.

It may be possible to use some kind wrapper object that can be serialized and will reestablish the RMI connection once sent to the EJB.

Upvotes: 0

Related Questions