正在加载图片...
//The code is used to create the client application used by the HelloApp application Import java. rm import Javax. naming public class CLient ublic static void main(String args) InitialContext Init=new InitialContext 0: HelloHome Home=(HelloHome)Init lookup( HelloJ) Hello HelloObjHome createD String RetValHelloObj. say Hello(Ron Floyd) System. out. println( Returned: Retval HelloObj removeD catch (ava. rmi RemoteException exception) System. out. printIn( Remote exception occurred: exception 客户应用使用 catch gavax, ejb. CreateException exception enterprise bean的 System. out. printIn( Create exception occurred: exception home接口和 remote接 catch (avax ejb. Remove Exception exception) 口访问bean提供的服 System. out. printIn( Remove exception occurred: exception) 务 catch (avax naming. NamingException exception System. out. println( Naming exception occurred: + exception)客户应用 ◼客户应用使用 enterprise bean的 home接口和remote接 口访问bean提供的服 务
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有