Yeah...there was another way to do that which was much easier, but if it
works! :-P
Brent Verner wrote:
[2005-03-05 13:40] Brent Verner said:
| Before I crashed last night (er, this morning), I whipped
| up a quick ProxyRegistry that does most of that. I never
| quite got it to work, though--I think I need a little better
| understanding of what/when things actaully get marshalled to
| the client JVM...details :-) Of course, I'd rather not have
| to learn a thing and just tell something to go do it :-)
|
| I'm going to spend a couple of hours today, poking at
| this ProxyRegistry bit I have here, and see if I can get it
| working, because it is only a handful of code so far. If
| I don't get it working...another weekend.
whoo-freakin-hoo!!!! I've done it! Sorry, I just had to
share the excitement with someone, because my computer seems
a bit unimpressed :-P
It's all still a bit messy, but basically there are two
Remote interfaces that the end-client gets:
ProxyRegistry, which does the dance to return
a Proxy or a Remote, because inside of the proxy,
I need the actual Remote. Basically just implements
Registry.lookup(String) to return the right thing.
Of course, the Proxy classes are marshalled to the
client JVM, so I also had to have something to
get the method call back to the proxy JVM. I tried
to make InvocationHandler a Remote, but Method is
not Serializable...so there's the next bit...
RemoteInvoker, which is given to the InvocationHandler
to pass the calls back thru to the proxy JVM for
passing thru to the real Remote via its only method...
public Object invoke(String methodName, Object[] args, Class[] clargs)
throws Exception;
There are a few other bits of plumbing, and it is all
a gruesome hack, but it is a working hack :-)...
cheers (and now beers!)
Brent
_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org
.
_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org