|
Re: rmi -- no such object in table: msg#00038java.sun.rmi
On Sun, 30 Sep 2001 13:32:15 -0700, Kevin Li <kevinli@xxxxxxxxx> wrote: >Thanks joe, > >do you think it will help to do reconnect (lookup() ) from client site >when >ever the connection was lost ? >since either restart server or client will fix this problem... > >Thanks > >Kevin > >On Friday, September 28, 2001, at 04:58 PM, Joseph Dane wrote: > >>>>>>> "Kevin" == Kevin Li <kevinli@xxxxxxxxx> writes: >> >> Kevin> Dear Members. >>>>> there are a few things you could try. >>>>> >>>>> 1) keep a reference to the RMI server somewhere other than the >>>>> registry. since you've got a singleton, you could have a static >>>>> variable somewhere to hold the reference. then, even if the >>>>> registry fails to renew the lease, the server won't be GC'd. >>>>> >> Kevin> For this point, you mean doing this from client side or server >> Kevin> side ? eg. >> >> I meant from the server side. that way, even if the DGC fails for >> some reason, there will always be a strong local reference to the >> server, so it won't get reaped. >> >> it's not enough to have a local variable (e.g. in main()), because >> this will go out of scope as soon as main() returns. I meant >> something like >> >> public class Server extends UnicastRemoteObject implements MyRemote { >> >> public static Server theServerRef; >> >> Server() throws RemoteException { ... } >> >> public static void main(String[] args) { >> >> >> Server.theServerRef = new Server(); >> Naming.rebind( ... ); >> ... >> } >> } >> >> also, if the static field were declared 'private', and not referenced >> anywhere else in the code, I suppose a smart enough GC could figure >> out that the reference to the server could never escape, and collect >> it. I can't believe GC's are that smart, but IANAGCW(*). >> >> (*) I Am Not A Garbage Collector Writer >> >> -- >> >> joe > > ========================================================================== >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 Hello guys, Any result and final solution for this excepiton? I also encounter this problem recently. My enviroment is: Solaris 8 with JDK 1.3.1 it will happen when server starting for 2 hours. Has the remote object really been GC'ed? Thanks, iMac =========================================================================== 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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: rmi -- no such object in table, SUBSCRIBE RMI-USERS iMac |
|---|---|
| Next by Date: | Re: rmi -- no such object in table, Kevin Li |
| Previous by Thread: | Re: rmi -- no such object in table, SUBSCRIBE RMI-USERS iMac |
| Next by Thread: | Re: rmi -- no such object in table, Kevin Li |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |