Can an EJB send asynchronous notifications to its clients?

Alex Chaffee

[. 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? .
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact