Search code examples
javaplayframeworkrmiremoting

Remoting in Play framework


I've got existing Play application, I need to add to it remoting capacities.

RMI would be ideal choose, since I don't need to rewrite original client application. It's possible to run rmi registry myself, but I would like to avoid it. In EJB container rmi registry starts itself.

Another option - is to use Hessian for example, but in this case I need to add special servlet mapping in web.xml Is it possible to do it in Play ?

Or I can use web-services, but it's more like overkill in my situation. And again I need to add mapping in web.xml for Axis of CXF for example.

Could you suggest fastest and easiest way to add remoting for play application ?


Solution

  • Play provides a library (WS) which makes it very easy to connect with 3rd party apps via HTTP requests. That would be your best bet if you can add a REST layer to the remote application.

    If not, you could try to use RMI and run play within a Java EE container as a war file (to get access to container), but that will hinder the normal developemnt flow.

    Choosing one or the other may depend on the effort involved to add that REST layer. If it's not too complex, I would favour that.