fixed port communicated for EJB

S

Shinya Koizumi

I noticed from this paragraph below if i want to talk to ejb container with
the specific port
I can specify the initialport number like what the following said. However,
once client establishes
the connection to the container, server talkes back to the client using
random port number.
I want to know if there is a way to use a fixed port instead of random ones.

From EJB Faq.

The default naming service port in the app server is 3700. If the naming
service is running on a different port, you'll need to set it via
the -Dorg.omg.CORBA.ORBInitialPort property when starting the client JVM.
You can double-check the actual naming service port for a given server
instance by looking in the server instace's domain.xml for "orb-listener-1".
Alternatively, check the Applications..Configuration..ORB..IIOP Listeners
section of the admin GUI for orb-listener-1.

Assuming the server's naming service port is 9876 and the client is on the
same host as the server :

java -Dorg.omg.CORBA.ORBInitialPort=9876
-classpath
$APS_HOME/lib/appserv-rt.jar:$APS_HOME/lib/javaee.jar:/home/user1/myclasses
acme.MyClient

SK
 
G

Gordon Beaton

However, once client establishes the connection to the container,
server talkes back to the client using random port number. I want to
know if there is a way to use a fixed port instead of random ones.

The random port number used to communicate with the client is a result
of the mechanism used by the client itself to establish the
connection.

There is rarely any reason for caring (or even knowing) which port the
client is using. Why do you want to do this?

/gordon
 
T

Tiwkiz

But the server can't response back in the fixed port.

I need this feature to call ejbs through the firewall.

SK
 
G

Gordon Beaton

But the server can't response back in the fixed port. I need this
feature to call ejbs through the firewall.

Which is behind the firewall - the server or the client?

Regardless, if the initial connection through the firewall is
successful, the firewall should create an association so that
responses on the same connection reach the intended recipient.

The server shouldn't need to create a *new* connection to reply to the
client, it should respond using the connection already set up by the
client.

/gordon
 
T

Tiwkiz

Gordon Beaton said:
Which is behind the firewall - the server or the client?

Regardless, if the initial connection through the firewall is
successful, the firewall should create an association so that
responses on the same connection reach the intended recipient.

The server shouldn't need to create a *new* connection to reply to the
client, it should respond using the connection already set up by the
client.

/gordon

--
This is not the case with RMI.

SK
 
L

Lew

Tiwkiz said:
FYI

Web Logic give the option to specify the port for the application server to
communicate with the client

http://publib.boulder.ibm.com/infoc...pport.was.doc/html/EJB_Container/1008407.html

RMI, HTTP, blah-blah - the setting up of ports by a client is at a different
layer than the application. To be useful without being annoying, a
properly-configured firewall will recognize that the client is establishing a
connection from indside, and associate the client port with that permission
for the requested server, as was stated earlier this thread. This is done by
the firewall, so it matters not what application makes the request, *unless*
the firewall is set up to be especially intrusive.

- Lew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,277
Latest member
VytoKetoReview

Latest Threads

Top