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 / August 2006

Tip: Looking for answers? Try searching our database.

rmi, two binding methods, what differences?

Thread view: 
John_Woo - 20 Aug 2006 13:19 GMT
Hi,

I'm wondering, which better/differences, in the following two rmi
binding methods:

A.
java.rmi.registry.LocateRegistry.createRegistry(defport);
Services server = new ServicesImpl();
Naming.rebind("rmi://ahost:aport/aService", server);

B.
Registry registry = LocateRegistry.getRegistry();
registry.rebind("aName", astubObject);

It seems A has to use a port, which may need a special setting over
firewall; for B, what's the port number?

--
Thanks
John
Toronto
staudinger - 20 Aug 2006 17:28 GMT
John_Woo schrieb:

> B.
> Registry registry = LocateRegistry.getRegistry();
> registry.rebind("aName", astubObject);
>
> It seems A has to use a port, which may need a special setting over
> firewall; for B, what's the port number?

1099 by default.
John_Woo - 20 Aug 2006 22:20 GMT
> John_Woo schrieb:
>
[quoted text clipped - 6 lines]
>
> 1099 by default.

what about if 1099 already in used?

what significant difference between A & B?

--
Thanks
John
EJP - 21 Aug 2006 01:36 GMT
>>John_Woo schrieb:
>>
[quoted text clipped - 8 lines]
>
> what about if 1099 already in used?

It shouldn't be because it is reserved by IANA for the RMI Registry. So
if it's in use it *should* mean that the RMI Registry is already running.

> what significant difference between A & B?

The significant difference is that A starts the registry on port
'defport' and B assumes it is already running on port 1099.
John_Woo - 21 Aug 2006 15:22 GMT
> >>John_Woo schrieb:
> >>
[quoted text clipped - 16 lines]
> The significant difference is that A starts the registry on port
> 'defport' and B assumes it is already running on port 1099.

Thanks lots,

the port 1099, in my unix, may already be used by other app (not java).
in this case,
how would you think the default port for rmi?

John
EJP - 22 Aug 2006 02:45 GMT
> the port 1099, in my unix, may already be used by other app (not java).
> in this case,
> how would you think the default port for rmi?

I don't understand the question but I've already told you that port 1099
is reserved by IANA, which is the Internet Assigned Numbers Authority,
for the RMI Registry. So any other application that is using 1099 is
non-compliant and should be fixed or trashed.

If you can't get the application using 1099 fixed, use another number,
obviously.


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



©2008 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.