Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

How to Bind Remote Object particular IP Address

Thread view: 
sherazi - 24 Oct 2005 11:05 GMT
 On my System there are two Ethernet Adapter attached. I want to bind
my remote object with particular IP address of Ethernet card .How I can
set IP address to which remote object cab be bind.

Following is the code for binding the object

systemProperties.put("java.rmi.server.hostname", serverAddress);
Registry reg =
LocateRegistry.createRegistry(Constants.RMI_REGISTRY_PORT);
reg.rebind("My Object", remoteobject);

Thanks in Advance.
Roedy Green - 24 Oct 2005 14:12 GMT
>  On my System there are two Ethernet Adapter attached. I want to bind
>my remote object with particular IP address of Ethernet card .How I can
>set IP address to which remote object cab be bind.

I don't understand quite what the problem is, and the answers to some
of the questions I think you may be asking are platform/router
specific.

If you want simply to find out what ip addresses are assigned to the
current machine, you can use the Java source at
http://mindprod.com/ip.html
called "WhoAmI"

In Windows you can find out such information with the IPCONFIG
utility.

In Windows you can also find out with control panel, Network and
Dialing digging in the TCP/IP protocol section.  You will have to
assign a permanent IP rather than using DHCP if you want something
fixed you can talk about elsewhere on your LAN.  Instead of using raw
IPs, you can assign host names in your hosts file and propagate that
around the LAN.

See http://mindprod.com/jgloss/hosts.html

If there are people coming in from the outside the LAN, you will have
to configure your router to direct them to the correct ip/port.  Again
you will need fixed ips on your servers for that, in the range
192.168.0.1 .. 192.168.255.254 where 192.168.0.1 is usually the
router.

Pretty much any time you can use "http://mindprod.com" in Java you can
also use "http://24.85.32.136"
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Tim Smith - 25 Oct 2005 04:58 GMT
> >  On my System there are two Ethernet Adapter attached. I want to bind
> >my remote object with particular IP address of Ethernet card .How I can
[quoted text clipped - 3 lines]
> of the questions I think you may be asking are platform/router
> specific.

He wants it to listen only on one specific IP address, rather than the
default of INADDR_ANY.

There's discussion of this problem (a very muddled discussion) here:

<http://forum.java.sun.com/thread.jspa?threadID=579134&messageID=2921038>

Signature

--Tim Smith

Roedy Green - 25 Oct 2005 11:44 GMT
On Tue, 25 Oct 2005 03:58:12 GMT, Tim Smith
<reply_in_group@mouse-potato.com> wrote, quoted or indirectly quoted
someone who said :

>He wants it to listen only on one specific IP address, rather than the
>default of INADDR_ANY.

OK, I see now.  I figured that part would be easy once he knew the
desired IP.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.