Re: question about EJB
Nathac wrote:
What is the reason for an ejb to communicate with client through random
ports?
Whan a ejb client access the ejb container, i can specify the ip and port
for the ejb container.
However, the server talks me back with random port. Why this is necessary
and don't give any
options to fix the port number?
It's the standard way to make a TCP connection for most protocols.
Each TCP connection is defined by four values:
server IP address, server port number,
client IP address, client port number
There isn't any difference between client and server when things get
going. The server and client IP address will be fixed. The server port
number will be fixed for any 'well known service' (see /etc/services, or
similar for Windows).
That leaves the client port number, which doesn't matter. It just has to
leave the 4-tuple unique for a given connection. As the other three
numbers are fixed, it should vary. Randomness is helpful, but not
essential, to preventing certain kinds of attacks.
Tom Hawtin