fixed port communicated for EJB  
Author Message
Shinya Koizumi





PostPosted: 2007-1-22 19:15:00 Top

java-programmer, fixed port communicated for EJB 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


 
Gordon Beaton





PostPosted: 2007-1-22 19:30:00 Top

java-programmer >> fixed port communicated for EJB On Mon, 22 Jan 2007 11:14:34 GMT, Shinya Koizumi wrote:
> 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

--
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
 
Tiwkiz





PostPosted: 2007-1-23 1:52:00 Top

java-programmer >> fixed port communicated for EJB But the server can't response back in the fixed port.

I need this feature to call ejbs through the firewall.

SK


 
 
Gordon Beaton





PostPosted: 2007-1-23 2:01:00 Top

java-programmer >> fixed port communicated for EJB On Mon, 22 Jan 2007 17:52:22 GMT, Tiwkiz wrote:
> 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

--
[ don't email me support questions or followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
 
 
Tiwkiz





PostPosted: 2007-1-23 5:12:00 Top

java-programmer >> fixed port communicated for EJB
"Gordon Beaton" <email***@***.com> wrote in message
news:45b4fbee$0$22507$email***@***.com...
> On Mon, 22 Jan 2007 17:52:22 GMT, Tiwkiz wrote:
>> 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
>
> --
This is not the case with RMI.

SK


 
 
Tiwkiz





PostPosted: 2007-1-23 5:50:00 Top

java-programmer >> fixed port communicated for EJB FYI

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

http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/topic/com.ibm.support.was.doc/html/EJB_Container/1008407.html



 
 
Lew





PostPosted: 2007-1-23 7:01:00 Top

java-programmer >> fixed port communicated for EJB Tiwkiz wrote:
> FYI
>
> Web Logic give the option to specify the port for the application server to
> communicate with the client
>
> http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/topic/com.ibm.support.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