Object h = ctx.lookup("HelloWorldEJB"); home = (HelloWorldHome) PortableRemoteObject.narrow(h, HelloWorldHome.class); } catch (NamingException ne) { System.err.println("Unable to lookup the HelloWorld EJB."); System.err.println("Please make sure that the bean has been deployed"+ ", and the client's classpath has been set correctly."); throw ne; } try { HelloWorld hw = home.create(); System.out.println("Say Hello to EJB."); String ejbSays = hw.helloWorld(); System.out.println("The EJB said: "+ejbSays); } catch (Exception e) { System.err.println("Received an unexpected exception " + e + " while using the HelloWorldEJB."); throw e; } } public static void main(String[] argv) throws Exception { HelloWorldClient hwc = new HelloWorldClient(argv); hwc.runClient(); } } 其他命令: 设置环境: C:/bea/weblogic81/server/bin/setWLSEnv 或者 C:/bea/user_projects/domains/mydomain/setEnv 编译: javac -d . *.java 打包: jar cf packagename.jar *.* weblogic打包: java weblogic.ejbc packagename.jar C:/packagename.jar
无状态 架构 无状态 cjb
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。

提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章