EJB是企业级Java构件,用于开发和部署多层结构、分布式、面向对象的Java应用系统。其中,( )负责完成服务端与客户端的交互;( )用于数据持久化来简化数据库开发工作;(请作答此空)主要用来处理并发和异步访问操作。
- A.会话型构件
- B.实体型构件
- C.COM构件
- D.消息驱动构件
正确答案及解析
正确答案
解析
EJB分为会话Bean、实体Bean和消息驱动Bean。(1) 会话Bean:用于实现业务逻辑,它可以是有状态的,也可以是无状态的。每当客户端请求时,容器就会选择一个会话Bean来为客户端服务。会话Bean可以直接访问数据库,但更多时候,它会通过实体Bean实现数据访问。(2) 实体Bean:用于实现O/R映射,负责将数据库中的表记录映射为内存中的实体对象。事实上,创建一个实体Bean对象相当于新建一条记录;删除一个实体Bean会同时从数据库中删除对应记录;修改一个实体Bean时,容器会自动将实体Bean的状态和数据库同步。(3) 消息驱动Bean:EJB3.0中引入的新的企业Bean,它基于JMS消息,只能接收客户端发送的JMS消息后处理。MDB实际上是一个异步的无状态会话Bean,客户端调用MDB后无须等待,立刻返回,MDB将异步处理客户请求。这适合于需要异步处理请求的场合,如订单处理,这样就能避免客户端长时间地等待一个方法调用直到返回结果。
包含此试题的试卷
你可能感兴趣的试题
( )is that it provides guidance and direction on how quality will be managed and verified throughout the project.
-
- A.Plan Quality Management
- B.Manage Quality
- C.Control Quality
- D.Project Charter
- 查看答案
( )the process of determining,documenting,and managing stakeholder needs and requirements to meet Project objectives.
-
- A.Plan Scope Management
- B.Collection Requirements
- C.Validate Scope
- D.Control Scope
- 查看答案
The information security management system preserves the confidentiality,integrity and availability of information by applying a( ).
-
- A.technology management process
- B.resource management process
- C.quality management process
- D.risk management process
- 查看答案
( )is a decentralized database,ensure that the data will not be tampered with and forged.
-
- A.Artificial intelligence
- B.Blockchain
- C.Sensing technology
- D.Big datA
- 查看答案
( )puts computer resources on the web,and must meet the requirements of super capacity,super concurrency,super speed and super security.
-
- A.Cloud computing
- B.Big datA
- C.Blockchain
- D.Internet of things
- 查看答案