[2005-03-05 11:00] [EMAIL PROTECTED] said:
| So its simple to do but I guess there are a few pieces to understand.
heh. I knew what you meant :-)
| So when you look up a Session bean in JBoss you get back a Dynamic Proxy
| (see java.lang.reflect.Proxy). The proxy is composed of your remote
| interface, an invocation handler and a chain of "interceptor"s. The
| last is in the InvokerInterceptor which picks the invoker (generally the
| JRMP aka RMI invoker) which sends the request to the server. The JRMP
| server-side invoker takes the request and sends it accross the JMX bus
| to the MBean representing your EJB. The EJB is a JMX MBean with the
| "invoke" operation that takes the "Invocation" object created by the
| client. It sends the "Invocation" object accross the chain of
| server-side interceptors to the final Bean class.
|
| All of this is configured in standardjboss.xml. (client is part of the
| proxy-binding and the server is part of the container configuration).
|
| To pull this off you have to write your own (server-side) interceptor
| that either calls the EJB on the second target machine or one that calls
| the jmx/RMIAdapter and sends the Invocation object to the second remote
| server's EJB Container (the name is in the Invocation).
What I didn't see was where I could provide my own
Registry.lookup(String), or configure such a thing, to actually
pickup the "real" remote object to do the Proxy/InvocationHandler
dance with (from a different RMI server). Also, I didn't see
where any InvocationHandler return value would be checked for
being a Remote object (and needing to be proxied).
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.
cheers.
Brent
_______________________________________________
Juglist mailing list
[email protected]
http://trijug.org/mailman/listinfo/juglist_trijug.org