官术网_书友最值得收藏!

Enterprise JavaBeans

Enterprise JavaBeans (EJBs) are the Java classes where you can write your business logic. Though it is not a strict requirement to use EJBs to write business logic, they do provide many of the services that are essential in enterprise applications. These services are security, transaction management, component lookup, object pooling, and so on.

You can have EJBs distributed across multiple servers and let the application container (also called the EJB container) take care of component lookup (searching component) and component pooling (useful for scalability). This can improve the scalability of the application.

EJBs are of two types:

  • Session beans: Session beans are called directly by clients or middle-tier objects
  • Message-driven beans: Message-driven beans are called in response to Java Messaging Service (JMS) events

JMS and message-driven beans can be used for handling asynchronous requests. In a typical asynchronous request processing scenario, the client puts a request in a messaging queue or a topic and does not wait for immediate response. An application on the server side gets the request message, either directly using JMS APIs or by using MDBs. It processes the request and may put the response in a different queue or topic, to which the client would listen and get the response.

Java EE 8 contains EJB specification 3.2 and JMS specification 2.0.

主站蜘蛛池模板: 宜昌市| 彩票| 博兴县| 遂宁市| 军事| 铁岭县| 易门县| 马边| 芮城县| 社会| 台南县| 黑河市| 金山区| 尤溪县| 平和县| 额尔古纳市| 勐海县| 收藏| 芒康县| 从江县| 玉田县| 白玉县| 锦州市| 顺平县| 潜江市| 徐汇区| 濮阳市| 土默特右旗| 孝昌县| 乌审旗| 丰镇市| 利川市| 永登县| 孟津县| 涿鹿县| 淳化县| 石景山区| 博兴县| 沐川县| 海南省| 南投县|