作為Value Object的Order對象實現如下
public class Order implements java
private int orderid;
private String clientName;
private int number;
private String produnctName;
//省略setter getter方法
}
業務邏輯層注冊並開啟RMI服務器
public class OrderManagerServer {
public static void main(String[] argv)
{
try
{
LocateRegistry
IOrderManager usermananger = new OrderManager()
Naming
System
}
catch (Exception e)
{
System
}
}
}
客戶端的測試代碼如下
[
From:http://tw.wingwit.com/Article/program/Java/gj/201311/27812.html