Message-Driven Bean in EJB is understood!

zhaozj2021-02-16  64

(1) Message-Driven Bean is no HOME interface and Remote interface, it can be understood that it is just a general bean, similar to Sessin Bean, but cannot instantiate the outside. (2) MSG bean can call the entry bean for processing; (3) MSG bean is a MSG bean that must implement the MessageDriveNbean interface and the MessageListener interface, and to implement the method in this interface, such as: SetMessageDrivenContext (MessageDrivenContext MDC); ejbcreate (); ejbremove () OnMessage (Message Inmessage);

Especially onMessage (Message Inmessage), in this implementation method, the MSG bean can perform business processing (such as Session Bean) to call the interface implementation method of the Entity bean.

(4) MSG bean must only receive Queue's news?

转载请注明原文地址:https://www.9cbs.com/read-18731.html

New Post(0)