[2004-05-19 10:39] Kenneth Sizer said:
| This didn't seem like it would be a problem, but apparently I'm not quite as clever 
as I thought...
| 
| I have a client and a server, connected via RMI.  The client wishes to pass a 
"filter" to the server (see example below).  Now, I was thinking/hoping that through 
the magic of RMI, my serializable implementation of the server's WidgetFilter 
interface would be sent over the wire and used by the server without issue.  It seems 
I was wrong.  The marshalling/classNotFound exceptions I get seem to indicate that the 
MyWidgetFilter class definition needs to exist in the server's VM a priori, but I 
could have sworn that dynamic class transport was one of RMI's big "cool feature" 
bullet points.

Take a look at
  iiop/src/main/org/jboss/iiop/StubClassLoader.java
from the jboss source.  I believe you might be able to extricate
it with some effort if you can't use jboss ;-)

The original description, AFAIK, of a similar dynamic stub 
classloader is archived at
  http://swjscmail1.java.sun.com/cgi-bin/wa?A2=ind0009&L=rmi-users&P=R3631

The gist is that you must provide the client with a classloader
that can create a suitable stub class for performing the RMI.

hth.
  brent


P.S., If anyone out there has the SmartWorld-1.x.zip squirreled
      away, I'd gladly trade some beers for a copy.  Offer limited
      to persons in the RTP area :-)


Just incase the archived link above goes bad, the original 
message describing dynamic RMI stubs was
  "HOWTO: Use Dynamic Proxies as RMI stubs + HOWTO: Export dynamic"
by Rickard Oberg.

_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to