osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: Re: RMI port release and
LocateRegistry.createRegistry - msg#00005

List: java.sun.rmi

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

I'm afraid that you're just running into a bug (limitation) in Sun's
current J2SE RMI implementations:

http://developer.java.sun.com/developer/bugParade/bugs/4457683.html
http://developer.java.sun.com/developer/bugParade/bugs/4508962.html

-- Peter


Quoting MOJICA,CESAR (HP-Roseville,ex1) <cesar.mojica@xxxxxx>:
> Hi,
>
> Does anyone know a way to release an in-application RMI registry port
> without exiting the application? I'm creating the registry using
> LocateRegistry.createRegistry. I've tried unexporting the registry, with no
> success:
>
> private void testRMIPortRelease() {
> System.out.println("Testing port release");
>
> System.out.println("Acquiring port... ");
> Remote reg = null;
> try {
> reg = LocateRegistry.createRegistry(1102);
> }
> catch (RemoteException ex) {
> ex.printStackTrace();
> }
>
> System.out.println("releasing port... ");
> try {
> java.rmi.server.UnicastRemoteObject.unexportObject(reg, true);
> }
> catch (NoSuchObjectException ex1) {
> ex1.printStackTrace();
> }
> reg = null;
> }
>
>
> -cm
>

===========================================================================
To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body
of the message "signoff RMI-USERS". For general help, send email to
listserv@xxxxxxxxxxxx and include in the body of the message "help".

For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html

To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html



Thread at a glance:

Previous Message by Date:

RMI port release and LocateRegistry.createRegistry

Hi, Does anyone know a way to release an in-application RMI registry port without exiting the application? I'm creating the registry using LocateRegistry.createRegistry. I've tried unexporting the registry, with no success: private void testRMIPortRelease() { System.out.println("Testing port release"); System.out.println("Acquiring port... "); Remote reg = null; try { reg = LocateRegistry.createRegistry(1102); } catch (RemoteException ex) { ex.printStackTrace(); } System.out.println("releasing port... "); try { java.rmi.server.UnicastRemoteObject.unexportObject(reg, true); } catch (NoSuchObjectException ex1) { ex1.printStackTrace(); } reg = null; } -cm =========================================================================== To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body of the message "signoff RMI-USERS". For general help, send email to listserv@xxxxxxxxxxxx and include in the body of the message "help". For a list of frequently asked RMI questions please refer to: http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html To view past RMI-USERS postings, please see: http://archives.java.sun.com/archives/rmi-users.html

Next Message by Date:

Re: RMI port release and LocateRegistry.createRegistry

Thanks for the info. So I guess a workaround would be to exec rmiregistry and destroy the subprocess when no longer needed. Does that sound reasonable? -cm > -----Original Message----- > From: Peter Jones - JavaSoft East [mailto:jones@xxxxxxxxxxxxxxxxxxxx] > Sent: Tuesday, November 18, 2003 5:14 PM > To: MOJICA,CESAR (HP-Roseville,ex1) > Cc: RMI-USERS@xxxxxxxxxxxx > Subject: Re: RMI port release and LocateRegistry.createRegistry > > > I'm afraid that you're just running into a bug (limitation) in Sun's > current J2SE RMI implementations: > > http://developer.java.sun.com/developer/bugParade/bugs/4457683.html > http://developer.java.sun.com/developer/bugParade/bugs/4508962.html > > -- Peter > > > Quoting MOJICA,CESAR (HP-Roseville,ex1) <cesar.mojica@xxxxxx>: > > Hi, > > > > Does anyone know a way to release an in-application RMI > registry port > > without exiting the application? I'm creating the registry using > > LocateRegistry.createRegistry. I've tried unexporting the > registry, with no > > success: > > > > private void testRMIPortRelease() { > > System.out.println("Testing port release"); > > > > System.out.println("Acquiring port... "); > > Remote reg = null; > > try { > > reg = LocateRegistry.createRegistry(1102); > > } > > catch (RemoteException ex) { > > ex.printStackTrace(); > > } > > > > System.out.println("releasing port... "); > > try { > > java.rmi.server.UnicastRemoteObject.unexportObject(reg, true); > > } > > catch (NoSuchObjectException ex1) { > > ex1.printStackTrace(); > > } > > reg = null; > > } > > > > > > -cm > > > =========================================================================== To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body of the message "signoff RMI-USERS". For general help, send email to listserv@xxxxxxxxxxxx and include in the body of the message "help". For a list of frequently asked RMI questions please refer to: http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html To view past RMI-USERS postings, please see: http://archives.java.sun.com/archives/rmi-users.html

Previous Message by Thread:

RMI port release and LocateRegistry.createRegistry

Hi, Does anyone know a way to release an in-application RMI registry port without exiting the application? I'm creating the registry using LocateRegistry.createRegistry. I've tried unexporting the registry, with no success: private void testRMIPortRelease() { System.out.println("Testing port release"); System.out.println("Acquiring port... "); Remote reg = null; try { reg = LocateRegistry.createRegistry(1102); } catch (RemoteException ex) { ex.printStackTrace(); } System.out.println("releasing port... "); try { java.rmi.server.UnicastRemoteObject.unexportObject(reg, true); } catch (NoSuchObjectException ex1) { ex1.printStackTrace(); } reg = null; } -cm =========================================================================== To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body of the message "signoff RMI-USERS". For general help, send email to listserv@xxxxxxxxxxxx and include in the body of the message "help". For a list of frequently asked RMI questions please refer to: http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html To view past RMI-USERS postings, please see: http://archives.java.sun.com/archives/rmi-users.html

Next Message by Thread:

Re: RMI port release and LocateRegistry.createRegistry

Thanks for the info. So I guess a workaround would be to exec rmiregistry and destroy the subprocess when no longer needed. Does that sound reasonable? -cm > -----Original Message----- > From: Peter Jones - JavaSoft East [mailto:jones@xxxxxxxxxxxxxxxxxxxx] > Sent: Tuesday, November 18, 2003 5:14 PM > To: MOJICA,CESAR (HP-Roseville,ex1) > Cc: RMI-USERS@xxxxxxxxxxxx > Subject: Re: RMI port release and LocateRegistry.createRegistry > > > I'm afraid that you're just running into a bug (limitation) in Sun's > current J2SE RMI implementations: > > http://developer.java.sun.com/developer/bugParade/bugs/4457683.html > http://developer.java.sun.com/developer/bugParade/bugs/4508962.html > > -- Peter > > > Quoting MOJICA,CESAR (HP-Roseville,ex1) <cesar.mojica@xxxxxx>: > > Hi, > > > > Does anyone know a way to release an in-application RMI > registry port > > without exiting the application? I'm creating the registry using > > LocateRegistry.createRegistry. I've tried unexporting the > registry, with no > > success: > > > > private void testRMIPortRelease() { > > System.out.println("Testing port release"); > > > > System.out.println("Acquiring port... "); > > Remote reg = null; > > try { > > reg = LocateRegistry.createRegistry(1102); > > } > > catch (RemoteException ex) { > > ex.printStackTrace(); > > } > > > > System.out.println("releasing port... "); > > try { > > java.rmi.server.UnicastRemoteObject.unexportObject(reg, true); > > } > > catch (NoSuchObjectException ex1) { > > ex1.printStackTrace(); > > } > > reg = null; > > } > > > > > > -cm > > > =========================================================================== To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body of the message "signoff RMI-USERS". For general help, send email to listserv@xxxxxxxxxxxx and include in the body of the message "help". For a list of frequently asked RMI questions please refer to: http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html To view past RMI-USERS postings, please see: http://archives.java.sun.com/archives/rmi-users.html
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!