So its simple to do but I guess there are a few pieces to understand.

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).

-Andy

Brent Verner wrote:

[2005-03-03 02:29] [EMAIL PROTECTED] said:
| I did this exactly for a JBoss consulting customer (actually I've done | this for 2 now). Its easy to do through the interceptor stack for the | EJB in JBoss. Basically, the interceptor repeats the call (we did this | very specifically but this could be generic) to the other appserver. | Now if you do this with HA-RMI then there is a little more to it (a | minor 2 lines of tweak to the HAJRMPProxy IIRC) but its trivial to do if | you know what you're looking for. | | The interceptor is simple to do. You just create a class with the | interface (use and existing one as a template) and just add it to the | proxy in either your jboss.xml or standardjboss.xml (global).


        Jesus Christ! I've spent the whole evening trying to figure
out this "simple" thing...and my head is about to explode,
because I've figured nothing out except that I can't wrap
my head around the unending-indirection-that-is-JBoss :-P

How much would you charge to send me a jboss configuration that will transparently "proxy" (in the non-Java sense) an
RMI server/service? I assume that JBoss has the deep magic
to properly "proxy" any Remote objects returned by a remote
method.


thanks.
        Brent


_______________________________________________ Juglist mailing list Juglist@trijug.org http://trijug.org/mailman/listinfo/juglist_trijug.org





_______________________________________________
Juglist mailing list
Juglist@trijug.org
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to