calling a method in another JVM instance
I know you can use RMI to call the methods from classes across the network, but if the class is on the same machine, just in another JVM instance, is there a way to bypass the network layer and have the JVMs communicate directly with each other?
[252 byte] By [
johnpeeba] at [2007-11-27 10:44:23]

> The use of the address 127.0.0.1 will make your OS's
> TCP stack take care of that.
While I know what you mean here this does not mean that you escape from RMI specific overhead.
> > The use of the address 127.0.0.1 will make your
> OS's
> > TCP stack take care of that.
>
> While I know what you mean here this does not mean
> that you escape from RMI specific overhead.
Well, no. I was under the impression it was the sockets overhead our friend was concerned with (bypass network layer)
Its not so much the overhead, as having the flexibility, to not have to modify firewall rules which disallow loop back traffic and most other non http (port 80) traffic if the production server is set up that way.
> Its not so much the overhead, as having the
> flexibility, to not have to modify firewall rules
> which disallow loop back traffic and most other non
> http (port 80) traffic if the production server is
> set up that way.
You're coding to interfaces anyway, have a factory return either an RMI object which does the actual RMI work, or just a vanilla one if you're just running locally. As far as I know, there isn't a way to entirely circumvent the socket layer with RMI. Anyone know any different?
> Its not so much the overhead, as having the
> flexibility, to not have to modify firewall rules
> which disallow loop back traffic
Well then you're screwed as far as Socket solutions go. So you'll have to do something else or modifuy the firewall rules.