连接到 Websphere rmi 服务器
我正在尝试对作为 Websphere 中安装的应用程序的一部分运行的远程对象进行远程调用。最终的解决方案将是RPG到本地java客户端来调用调用web服务的远程服务。这主要是因为我们有一组代码来调用 Web 服务并进行 xml 解析,而且 iSeries 无法直接访问互联网。
Iseries WebSphere 服务器 RPG>Java --> Java->Webservice
在我的 RMI 服务器类中,我像这样注册
Naming.rebind("rmi://127.0.0.1:2813/CAPostcodeService", obj);
如果我在本地计算机上使用 jdk,那么我运行“rmiregistry”并且可以正常连接,如果它在 Websphere 中运行,如何连接到该类。我假设 websphere 正在端口 2813 上运行 rmi 服务器,如管理控制台中所述。
我目前遇到读取超时问题,
CAPostcodeRMILookup exception: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out
我是刚开始使用 RMI,我可能会假设很多/很少:S
谢谢, 斯科蒂亚布
I'm trying to do a remote call to remote object running as part of a application installed in Websphere. The end solution will be RPG to local java cilent to call remote service that calls the webservice. This mainly so we have one set of code to call the webservice and doing the xml parsing, plus the iSeries doesn't have direct access to internet.
Iseries WebSphere Server
RPG>Java --> Java->Webservice
In my RMI server class I'm registering like this
Naming.rebind("rmi://127.0.0.1:2813/CAPostcodeService", obj);
If I'm using the jdk on my localmachine then I run the "rmiregistry" and can connect ok, how to I connect to the class if it's running within Websphere. I assumed websphere was running a rmi server on port 2813 as noted in the admin console.
I'm currently getting read time out issues
CAPostcodeRMILookup exception: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out
I'm new to using RMI I might be assuming up much/little :S
Thanks,
Scottyab
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
WebSphere RMI 不是通用的,可以将其视为内部的,包含 WebSphere 自己的 EJB RMI/IIOP 调用机制和管理服务。 2813 端口供管理工具访问。
在 WebSphere 中运行的应用程序代码可以公开可远程调用的 EJB、JMS 队列、Web 服务,或者您愿意为自己构建的任何 HTTP 请求/响应。
由于您打算在 WebSphere“内部”使用一次 Web 服务调用,为什么不能直接从独立的 java 中执行此操作?
The webSphere RMI is not general-purpose, consider it as internal, embracing WebSphere's own EJB RMI/IIOP invocation mechanism and admin service. The 2813 port is for access by admin tools.
Application code running in WebSphere can expose remotely callable EJBs, JMS queues, WebServices - or any HTTP request/responses you care to build for yourself.
As you intend to use a web service call once "inside" WebSphere, why could you not do that directly from your stand-alone java?
该端口可能用于远程 JMX 连接器。
That port is likely for the remote JMX connector.