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]
# 1

The use of the address 127.0.0.1 will make your OS's TCP stack take care of that. As far as your code is concerned, theres no difference between a remote JVM and a local one - it's still a different JVM instance

georgemca at 2007-7-28 20:06:33 > top of Java-index,Java Essentials,Java Programming...
# 2

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

cotton.ma at 2007-7-28 20:06:33 > top of Java-index,Java Essentials,Java Programming...
# 3

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

georgemca at 2007-7-28 20:06:33 > top of Java-index,Java Essentials,Java Programming...
# 4

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.

johnpeeba at 2007-7-28 20:06:33 > top of Java-index,Java Essentials,Java Programming...
# 5

> 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?

georgemca at 2007-7-28 20:06:33 > top of Java-index,Java Essentials,Java Programming...
# 6

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

cotton.ma at 2007-7-28 20:06:33 > top of Java-index,Java Essentials,Java Programming...