Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Destroy RMI Registry programmatically

Reply
Thread Tools

Destroy RMI Registry programmatically

 
 
Volker Raum
Guest
Posts: n/a
 
      02-14-2007
Hi everyone,
i got a little question about the Java RMI Registry.

In our Software use a RMI Registry.
Instead of doing this by starting an rmid we start the registry directly in the Code.

Registry registry = java.rmi.registry.LocateRegistry.createRegistry(re gistryPort);

Everything works 100% perfectly.

The only thing we would like to do is to destroy this factory again programmatically.
Any Ideas ?

Volker
 
Reply With Quote
 
 
 
 
Esmond Pitt
Guest
Posts: n/a
 
      02-15-2007
Volker Raum wrote:
> Hi everyone,
>
> Registry registry =
> java.rmi.registry.LocateRegistry.createRegistry(re gistryPort);
>
> The only thing we would like to do is to destroy this factory again
> programmatically.


UnicastRemoteObject.unexportObject(registry, true);

This only works if 'registry' is the result returned by
LocateRegistry.createRegistry(), and specifically *not* by
LocateRegistry.getRegistry().
 
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
When to destroy, when not to destroy Ook C++ 2 10-11-2005 02:11 AM
How to unexport or shut down programmatically created rmi registry? m@rtin-burger.de Java 1 05-24-2005 12:17 AM
Why does java.rmi.Naming not implement interface java.rmi.Registry? Jan Schulze Java 1 03-26-2005 07:45 AM
RMI Vs RMI over IIOP JScoobyCed Java 1 01-28-2005 09:54 AM
RMI, JINI or RMI/IIOP Buu Nguyen Java 1 08-25-2004 11:28 AM



Advertisments