当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

复旦大学:《高级Web技术》3-应用web_4-EJB_教学课件PPT_EJB开发-4-创建Session EJB

资源类别:文库,文档格式:PPT,文档页数:42,文件大小:408KB,团购合买
◼ 创建 Remote Interface ◼ 创建 Home Interface ◼ 创建 Enterprise Bean Class
点击下载完整版文档(PPT)

高级Web技术 Java 2 Enterprise Edition

高级Web技术 Java 2 Enterprise Edition

本次课程内容 创建 Remote Interface 创建 Home Interface ■创建 Enterprise Bean Class

本次课程内容 ◼ 创建 Remote Interface ◼ 创建 Home Interface ◼ 创建 Enterprise Bean Class

Create Remote Interface

Create Remote Interface

Remote接口 InterfacE Remote interface enterprise bean通过商业方法执行特定的任务 enterprise bean的商业方法不能被客户应用直接访问 Remote interface包含 enterprise bean实现的商业方法的定义 客户程序只能通过 remote interface访问 enterprise bean实现的商 业方法,不能直接调用

Remote接口 ◼ Remote Interface ◼ enterprise bean通过商业方法执行特定的任务 ◼ enterprise bean的商业方法不能被客户应用直接访问 ◼ Remote Interface包含enterprise bean实现的商业方法的定义 ◼ 客户程序只能通过remote interface访问enterprise bean实现的商 业方法,不能直接调用

相关角色 Remote接口由 Enterprise Bean Provider编写 ■EJB容器生成 Remote接口的实现 EJB Container Enterprise Bean Provider

相关角色 ◼ Remote接口由Enterprise Bean Provider编写 ◼ EJB容器生成Remote接口的实现

Remote接口定义 //The code is used to create the remote interface of an enterprise bean //used by the HelloApp application import javax.ejb. ki import java rmi.* public interface Hello extends EJBObject String sayHello(string MyName) throws RemoteException; 构建一个名为 HelloApp的J2EE应用,上图给出了 该应用所使用的 remote接口的定义 该应用中的 Enterprise bean只有一个商业方法 sayhello Remote接口Helo的定义中包含了 say Hello方法的定义

Remote接口定义 ◼ 构建一个名为HelloApp的J2EE应用,上图给出了 该应用所使用的remote接口的定义 ◼ 该应用中的Enterprise bean只有一个商业方法—— sayHello ◼ Remote接口Hello的定义中包含了sayHello方法的定义 //The code is used to create the remote interface of an enterprise bean //used by the HelloApp application import javax.ejb.*; import java.rmi.*; public interface Hello extends EJBObject { String sayHello(String MyName) throws RemoteException; }

import //used by the HelloApp application ote interface of an enterprise bean /The code is used to create the re import javax. ejb mport java rmi. F public interface Hello extends EJBobject { String sayHello(string MyName) throws Remote Exception import语句用来包含预定义的类 s Java.rm包使用java前缀,因为rm包是标准的Java2 SDK包 javax ejb包不是标准的Java2SDK包,是Java扩展 ( extension)包,Java扩展包并不包含在Java核心库中

//The code is used to create the remote interface of an enterprise bean //used by the HelloApp application import javax.ejb.*; import java.rmi.*; public interface Hello extends EJBObject { String sayHello(String MyName) throws RemoteException; } import ◼ import语句用来包含预定义的类 ◼ java.rmi包使用java前缀,因为rmi包是标准的Java 2 SDK包 ◼ javax.ejb包不是标准的Java 2 SDK包,是Java扩展 (extension)包,Java扩展包并不包含在Java核心库中

接口定义 //used by the HelloApp applicatiop ote interface of an enterprise bean /The code is used to create the re import javax.ejb. i import java rmi. i public interface Hello extends eJBobject String sayhello(string MyName) throws RemoteException; ■本例中定义了一个名为Heo的 remote接口,该接口被定义为 public 接口以允许其它构件访问

//The code is used to create the remote interface of an enterprise bean //used by the HelloApp application import javax.ejb.*; import java.rmi.*; public interface Hello extends EJBObject { String sayHello(String MyName) throws RemoteException; } 接口定义 ◼ 本例中定义了一个名为Hello的remote接口,该接口被定义为public 接口以允许其它构件访问

接口继承性 /The code is used to create the remote interface of an enterprise bean //used by the HelloApp application import javax.ejb. import java rmi K, public interface Hello extends EJBobject String sayHello(string MyName) throws Remote Exception Helo接口继承了 EJBObject接口 EJBobject接口包含在 javax. ejby包中,它又继承了 java rmi Remote接囗

接口继承性 //The code is used to create the remote interface of an enterprise bean //used by the HelloApp application import javax.ejb.*; import java.rmi.*; public interface Hello extends EJBObject { String sayHello(String MyName) throws RemoteException; } ◼ Hello接口继承了EJBObject接口 ◼ EJBObject接口包含在javax.ejb包中,它又继承了 java.rmi.Remote接口

方法定义 //used by the HelloApp application ote interface of an enterprise bean /The code is used to create the re import javax.ejb. import java rmi K, public interface Hello extends EJBObject String sayHello(String MyName)throws RemoteExdeption; Remote接口用来定义 enterprise bean的商业方 n本例中仅包含一个商业方法的定义— say Hello

方法定义 //The code is used to create the remote interface of an enterprise bean //used by the HelloApp application import javax.ejb.*; import java.rmi.*; public interface Hello extends EJBObject { String sayHello(String MyName) throws RemoteException; } ◼ Remote接口用来定义enterprise bean的商业方 ◼ 本例中仅包含一个商业方法的定义——sayHello

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共42页,可试读14页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有