Thứ Hai, 8 tháng 9, 2014

JMS

Yêu cầu : 
 TechSchool Solutions designs software systems for schools. One of the problemsthat the schools face is teacher absenteeism or teachers taking leaves on a short  notice. The schools find it difficult to call substitute teachers in such a short time. TechSchool Solutions is planning to build a system which would enable the school teachers to request for leaves using the school portal. The system would then send an e-mail to all the substitute teachers that have been registered in the system. As a member of the development team, you are required to build the JMS-based module. Your tasks involve developing a session bean that acts as a message listener and receives a message from the JMS queue whenever a teacher puts in a leave request. The session bean, then calls other modules that handle rest of the processes.

Giải quyết vấn đề : 
Bước 1:Mở trình duyệt gõ localhost:4848



Chọn Destination Resource

Chọn New

Bước 2 : Tạo 1 web application  sau đó ta tạo  một Java Managed Bean. Ở đây ta gọi JMS bằng cách sau : 



Code tự sinh sẽ như sau : 
Sau đó ta khai báo các thông số : 

Ở trang index ta điền nội dung : 
Kết quả thu được : 

Không có nhận xét nào:

Đăng nhận xét