Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to Bind Remote Object particular IP Address

Reply
Thread Tools

How to Bind Remote Object particular IP Address

 
 
sherazi
Guest
Posts: n/a
 
      10-24-2005
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_REGIST RY_PORT);
reg.rebind("My Object", remoteobject);


Thanks in Advance.

 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      10-24-2005
On 24 Oct 2005 03:05:48 -0700, "sherazi" <>
wrote, quoted or indirectly quoted someone who said :

> 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"
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
 
 
 
Tim Smith
Guest
Posts: n/a
 
      10-25-2005
In article <>,
Roedy Green < > wrote:
> On 24 Oct 2005 03:05:48 -0700, "sherazi" <>
> wrote, quoted or indirectly quoted someone who said :
>
> > 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.


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>


--
--Tim Smith
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      10-25-2005
On Tue, 25 Oct 2005 03:58:12 GMT, Tim Smith
<> 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.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to bind a particular IP address for outbound reques ralderton ASP .Net 0 05-10-2009 04:43 AM
returned type of boost::bind && Address of a tmp object Giovanni Gherdovich C++ 3 08-28-2008 10:32 PM
how to create random object to a particular ruby object ? Pokkai Dokkai Ruby 20 04-17-2008 07:06 AM
How to Bind Remote Object particular WAN IP Address sherazi Java 0 10-25-2005 03:43 AM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 ASP .Net 1 10-02-2005 05:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57