• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to set RMI port explicitly?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using JBoss portal 2.6.2.GA with JBoss 4.2.1.GA.
I have problem connecting to RemoteEJB through a firewall.
My descriptor:


and of course:


The ports 1098 and 4444 are open on the firewall but there is a third port which is randomly jumps between 20000 and 45000 for each call.

Is there anyway to achieve something that is possible with plain RMI where I can explicitly set the port for communication through the UnicastRemoteObject(port)?

I tried to search jboss forums but did not find much on this subject. And what I have found tells me that all my descriptors are correct.

Thanks in advance!
 
Author
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out: http://wiki.jboss.org/wiki/UsingJBossBehindAFirewall

According to this wiki page, you'll have to specify the following when you start your server:

-Djava.rmi.server.hostname=<external_host_name>
-Djava.rmi.server.useLocalHostname=false

I haven't tried it before, so please post back here if you get it to work.
 
Sandor Arpa
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Javid!

I will try and let you know if works.
 
reply
    Bookmark Topic Watch Topic
  • New Topic