春天异步调用RMI [英] Spring Async RMI Call

查看:336
本文介绍了春天异步调用RMI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以调用Java RMI异步?我想我的RMI调用立即和一旦任务完成服务器调用回调返回。

Is it possible to invoke Java RMI asynchronously? I'd like my RMI call to return immediately and for the server to invoke a callback once a task is completed.

我目前会使用RMI支持Spring框架,我找不到它描述春天的任何文件,我怀疑我需要实现它自己。如果可能,请提供范例。

I'd currently using RMI support from Spring framework, and i couldn't find any documentation describing it in spring, I suspect I'll need to implement it myself. Please provide examples if possible.

在此先感谢!

推荐答案

RMI是同步的,不支持回调,据我所知。

RMI is synchronous and doesn't support callbacks as far as I know.

JMS是Java EE的方式,使非同步调用。如果你使用Spring,这将是一个消息驱动的POJO。

JMS is the Java EE way to make asynch calls. If you're using Spring, it would be a message-driven POJO.

另外一个地方去寻找,因为你已经使用Spring,要么是春季或Spring 集成。我想尝试这类原因之前,我自己写的。

Another place to look, since you're already using Spring, is either Spring Batch or Spring Integration. I'd try either of those before I wrote it myself.

但是,如果不为你做,你的怀疑是正确的 - 你必须自己实现它。

But if that doesn't do it for you, your suspicion is correct - you'll have to implement it yourself.

这篇关于春天异步调用RMI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆