avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Mortenson <l...@tanukisoftware.com>
Subject AltRMI "Missin beanImpl" problem
Date Sun, 14 Jul 2002 10:13:11 GMT
I have been using the AltRMI code with the Instrument Manager/Client code.
Usually it works great.  I am running it on a machine which can be 
suspended.
When the machine comes back up.  The client will sometimes need to reconnect
to the server code.

It looks like the client is trying to reconnect to the server using an 
old ReferenceID.
This is causing a NoSuchReferenceReply to be thrown by the server 
causing the
connection to be closed(?).   That would be fine, but this goes into a 
loop which
it never escapes from.
Exception is thrown in DefaultMethodInvocationHandler.java

I get output like the following on the server:
---
Missin beanImpl for 39
Missin beanImpl for 37
Missin beanImpl for 48
Missin beanImpl for 47
Missin beanImpl for 78
Missin beanImpl for 65
Missin beanImpl for 65
Missin beanImpl for 65
Missin beanImpl for 65
[INFO] One Connection closed.
Missin beanImpl for 65
Missin beanImpl for 65
[INFO] One Connection closed.
Missin beanImpl for 65
[INFO] One Connection closed.
Missin beanImpl for 65
[INFO] One Connection closed.
Missin beanImpl for 65
.
.
.
---
Is this a problem in the server or client code?


I was also sometimes getting NPEs from the same code.   So I think the 
following
change is necessary to fix that.
---
diff -r1.4 DefaultMethodInvocationHandler.java
180a181,182
 >                
 >                 return new NoSuchReferenceReply( 
request.getReferenceID() );
---
In this code:
---
            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() );
            }
---

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