Can an EJB send asynchronous notifications to its clients?
Location: http://www.jguru.com/faq/view.jsp?EID=206459 Created: Sep 14, 2000 Modified: 2000-09-14 19:43:44.527 Author: Alex Chaffee (http://www.jguru.com/guru/viewbio.jsp?EID=3) Question originally posed by Paul Chuang (http://www.jguru.com/guru/viewbio.jsp?EID=132238 [. e.g. the client displays alarm status of devices. If I use EJB to periodically check the database for alarm status change, how to program the EJB to forward notification to clients when the status is changed? ] Asynchronous notification is a known hole in the first versions of the EJB spec. The recommended solution to this is to use JMS, which is becoming available in J2EE-compliant servers. The other option, of course, is to use client-side threads and polling. This is not an ideal solution, but it’s workable for many scenarios. See also OK, so EJB doesn’t support user-created threads. So how do I perform tasks asynchronously? .