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 2006

Tip: Looking for answers? Try searching our database.

Question regarding RMI

Thread view: 
Johs32 - 18 Oct 2006 16:13 GMT
I have a remote object "Server" that sends the text "hi there" every 5
seconds. If I unbind it it keeps going on with the text.

Only if I make it return myself after a lookup in the rmiregistry (which
throws an exception if its not there) I can terminate it.

How does remote objects normally crash - do they throw some exception?

Seems wierd that they keep executing eventhough I have them unbinded, and
first stop if I explicitly make a lookup check.

I run the code on my own computer where I have started rmiregistry in winXP.
Matt Humphrey - 19 Oct 2006 13:37 GMT
>I have a remote object "Server" that sends the text "hi there" every 5
>seconds. If I unbind it it keeps going on with the text.

I'm somewhat baffled by your opening statement here. There's nothing in an
RMI server that automatically gives it repeating behavior and in any case
where would it send the message as you havn't mentioned clients. At first I
figured that you're talking about RMI callbacks.  However, you might mean
that the server process prints text every 5 seconds.  In either case, it
seems the culprit is the thread you make to do this 5-second printing.  That
process will not be affected by you unbinding the server.  The server
binding affects its ability to accept requests, but doesn't affect
connections already in place.  The callback object is essentially a
different server with a different connection--it will keep going until you
stop your thread.  If it's just the text, you must stop that thread
yourself.

> Only if I make it return myself after a lookup in the rmiregistry (which
> throws an exception if its not there) I can terminate it.

It sounds like your registration thread is really a loop, which explains the
repeating behavior.

> How does remote objects normally crash - do they throw some exception?

A normal RMI server responds to requests, any of which might individually
fail, but that normally doesn't affect the operation of the listening
process.  The server is considered crashed when it stops accepting
connections.  If your server has an internal process--its operation is
separate from how it accepts requests.

> Seems wierd that they keep executing eventhough I have them unbinded, and
> first stop if I explicitly make a lookup check.
>
> I run the code on my own computer where I have started rmiregistry in
> winXP.

Can you describe in more detail what your server really does or post a
simplified (very simplified) version of your server that exhibits this
behavior?

Matt Humphrey matth@ivizNOSPAM.com http://www.iviz.com/


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.