Search code examples
javascalaintegrationrmi

Java RMI with Scala, is this possible?


Java RMI -Remote Method Invocation- is Java to Java only.

On the Scala website I read that the integration with Java is seamless and that:

Scala programs run on the Java VM, are byte code compatible with Java so you can make full use of existing Java libraries or existing application code. You can call Scala from Java and you can call Java from Scala, the integration is seamless.

Does this mean that I can successfully use a Java to Scala RMI?

Did anyone experiment this first-hand?

EDIT:

Any known or discovered gotchas??


Solution

  • Yes, here's a link to a message thread where it looks like somebody's done it. It says:

    Yes it can! Thanks for help. I now have a little RMI-based pair of Scala programs that will be performing transfers of documents from one Documentum system to another (of a previous version); the Scala code is interacting very nicely with the Documentum Java libraries.

    Figuring out how to get the method signatures to include throws RemoteException seems to have been the biggest hurdle.