Web工程与RMI工程进行联调

1.首先导出RMI工程中的Service和entity类 到web工程中,以jar包的形式

 

public class ServiceManagerImpl {

private static ServiceRegist serviceRegist=null;
 
 public static ServiceRegist getServiceRegist(){
  if(null==serviceRegist){
   try {
    serviceRegist=(ServiceRegist)Naming.lookup("rmi://localhost:8888/serviceRegist");
    System.out.println("RMI Connection");
   } catch (MalformedURLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
   } catch (RemoteException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
   } catch (NotBoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
   }
  }
  return serviceRegist;
 }
}

 

 

 

Web工程与RMI工程进行联调,布布扣,bubuko.com

Web工程与RMI工程进行联调

上一篇:1.Scala类型层次结构


下一篇:IOS Core Animation Advanced Techniques的学习笔记(一)