| Author |
Bean Talking to Other Server
|
Ravi Verma
Ranch Hand
Joined: Aug 30, 2001
Posts: 42
|
|
Hi I am in a situation where A Bean should talk to the other java based server and vice versa(back and forth) which is communication thru TCP(ServerSockets), My requirement is how to make them communicate to interchance the Data. I am urgently need this help. Thanks in Advance Ravi ------------------ Ravi
|
Ravi
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 12513
|
|
What you want is a basic violation of the EJB architectural rules. There are a number of reasons why EJBs aren't allowed to use sockets and they're listed in the spec. Aside from the technical reasons, EJBs are supposed to be callable components, not calling ones, except to be able to call other EJBs. In general, any sort of socket services are supposed to be used by the EJB's client (often a servlet or JSP), not the EJB itself. There are 2 exceptions: 1. An EJB will implicitly use network facilities if invokes an EJB on another server. This is OK, because it uses the synchronous remote call mechanism of its container. The container is allowed things that the EJB itself is forbidden. One reason the EJB IS forbidden is to avoid damaging the internal contexts of the container. 2. In EJB2.0, a Message Driven Bean can be used for asynchronous services - this is a one-way trip, however.
|
One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
|
 |
 |
|
|
subject: Bean Talking to Other Server
|
|
|