【24h】

Implementing and Invoking a Remote Object Calling Native Methods via RMI-IIOP and JNI

机译:通过RMI-IIOP和JNI实现和调用调用本地方法的远程对象

获取原文
获取原文并翻译 | 示例

摘要

In this article, we discuss how to combine one of the distributed computing technologies created by Sun Microsystems, called RMI over IIOP, and its other famous technology, Java Native Interface JNI. Sometimes in a distributed computing application written entirely in Java, client side application need to invoke native methods specific to a platform and encoded in a another programming language (for example in C or C++) .To do this, we must make a distributed computing solution that can integrate native applications in Java. We think that Sun's RMI over IIOP and JNI is a good choice. The first reason is that, RMI over IIOP takes advantage of both RMI (easy to use and encoding uniquely in Java), and IIOP (interoperability with another CORBA ORB products). In addition to this, we can switch transport protocols from JRMP (Java Remote Method Protocol) to IIOP (Internet Inter-ORB). The second reason is that, JNI cannot only integrate native applications in Java, but can also embed JVM implementation in a native application. To demonstrate the combination between RMI-IIOP and JNI, we have developed a typical example: on the server side, implementation of a remote interface method create an instance of a Java class and called its native method, whose implementation use JNI and Borland InterBase C API to extract a database table. On the client side it invoked this remote object and displays the database table.
机译:在本文中,我们将讨论如何结合由Sun Microsystems创建的一种分布式计算技术(称为IIOP上的RMI)和其另一项著名的技术Java Native Interface JNI。有时在完全用Java编写的分布式计算应用程序中,客户端应用程序需要调用特定于平台的本机方法,并以另一种编程语言(例如C或C ++)进行编码。为此,我们必须提供一种分布式计算解决方案可以在Java中集成本机应用程序。我们认为Sun通过IIOP和JNI进行RMI是一个不错的选择。第一个原因是,基于IIOP的RMI既利用RMI(在Java中易于使用和唯一编码),又利用IIOP(与其他CORBA ORB产品的互操作性)。除此之外,我们还可以将传输协议从JRMP(Java远程方法协议)切换到IIOP(Internet Inter-ORB)。第二个原因是,JNI不仅可以将本地应用程序集成到Java中,而且还可以将JVM实现嵌入到本地应用程序中。为了演示RMI-IIOP和JNI之间的结合,我们开发了一个典型示例:在服务器端,实现远程接口方法创建Java类的实例,并称为其本机方法,其实现使用JNI和Borland InterBase C用于提取数据库表的API。在客户端,它调用了此远程对象并显示数据库表。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号