avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Mortenson <l...@tanukisoftware.com>
Subject Re: AltRMI "Missin beanImpl" problem
Date Sun, 14 Jul 2002 14:37:47 GMT
Paul Hammant wrote:

> When you say loop, that never escapes, do you mean that becase of the 
> lack of exception?  I will commit the patch you supply. 

I can commit if I have a patch.  Just don't have enough of a grasp on 
the low level altrmi code to fix this easily :-)

> The 'missin beanimpl xx' problem is likely to be caused by a 
> handshaking issue between client and server.  I'll take a look at it.  
> Does the exception ever occur if the JVM has not been suspended?  Do 
> you mean like suspend-laptop in MS Windows?  .. the whole OS is dumped 
> to the hard drive? 

I have seen this and the second problem at the bottom of the message 
when the server-side JVM is restarted as well.  The client seems to be 
reconnecting, but not realizing that the JVM is different from the one 
it was just connected to.

Yup, one of my machines is an XP notebook that can be suspended to ram 
or disk.   Most things resume without any problems.  But sometimes 
timeouts will fire because the system clock appears to jump ahead by 
several hours.

In the following code in DefaultMethodInvocationHandler.java, there are 
cases where
wr is null, and cases where wr is not null, but beanImpl is.   I added 
the throw in the
case where wr is null to avoid the NPE in the next line of code.  This 
does not seem to
be what is needed to tell the client to stop trying to reconnect with 
the same information
over and over and over again.
---
            WeakReference wr = (WeakReference)mRefBeans.get( 
request.getReferenceID() );

            if( wr == null )
            {
                System.out.println( "missing weak reference for 
referenceID - "
                                    + request.getReferenceID() + " pub " 
+ mPublishedThing );
               
                return new NoSuchReferenceReply( request.getReferenceID() );
            }

            Object beanImpl = wr.get();

            if( beanImpl == null )
            {
                System.out.println( "Missin beanImpl for " + 
request.getReferenceID() );

                return new NoSuchReferenceReply( request.getReferenceID() );
            }
---

Cheers,
Leif



--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message