[EMAIL PROTECTED] wrote:
> No, the GamekeeperRemoteServer is a runnable class (ie it contains the main
> method). It just sits there doing nothing in particular. Ie it creates an
> instance of itself, and waits until the client connects. It only dies like
> this after about 10 minutes of no use. After a client has used the server,
> does it have to do somethign special to disconnect?
The question is who is holding references to the Remote object. Do you
publish the server to a registry (with Naming.bind(), for example)? How
do clients get the RMI stub they need to call the server? If no running
Java app - local or remote - is holding any live, strong references to
the object, it has every right to go away. Having a main() method in the
class doesn't change this (unless you keep a reference to the object in
main() and make main() immortal).
Have you tried this in other environments? Is this definitely a
Linux-specific problem you're seeing?
Nathan
>
> > > System Error:at
>sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:249)
> > > System Error:at
>sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:224)
> > > System Error:at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
> > > System Error:at
>com.teamenergy.secure.permissionsserver.GamekeeperRemoteServer_Stub.getActivityPermissions(UnknownSource)
> > >
> > > I have a small RMI Server which happily runs on a Jdk1.2.2rc2 under Linux.
> > > It works fine, but after a while the client gives the above error when it
> > > tries to connect. If I just restart the server, it works again.
> >
> > Is there any period of time during which there is no hard reference to
> > the GamekeeperRemoteServer object or a stub either in the server, a
> > registry, or any clients? If so, the object may have been
> > garbage-collected.
>
> No, the GamekeeperRemoteServer is a runnable class (ie it contains the main
> method). It just sits there doing nothing in particular. Ie it creates an
> instance of itself, and waits until the client connects. It only dies like
> this after about 10 minutes of no use. After a client has used the server,
> does it have to do somethign special to disconnect?
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]