目的:ejb客户端的代码和部署ejb的container(j2ee server)运行在一台机器上,remote调用失去意义,使用local调用可以提高performance实现:使用local和local home interface取代原来的remote和remote home interface,暴露的method不变,exception符合local接口的规范。bean文件不变(可能throw出的RemoteException也改变一下)调用:利用jndi查找local home,create/find出local接口对象,调用商业method。原理:原来的remote调用,因为调用请求和结果反馈都经过client端的stub和server端的skelekon处理,performance自然打折扣。使用local调用,机制我不清楚。