SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 312 | Next

Moh'd A. Radaideh and Hayder Al-ameed

"Architecture of Reliable Web Applications Software"

There are times when it is not
encouraged, and specifically for J2EE, it is suggested to be incorrect. For example, when
performing database transactions asynchronously, a transaction is preferred for all the security
context concerns (Brown, 2005). Asynchronous beans helps alleviate some of this
limitation, as discussed in the next section.
Asynchronous Beans in J2EE
Spinning new threads from a servlet for asynchronous task processing is a common design
approach until recent times. Some of the drawbacks of this approach include: The transaction
loses container security, transaction scope, and lack of failover during critical failures.
J2EE came up with a standard solution to solve this problem, in which the servlet request
places the task information as a message in queue, and message-driven beans (MDB) read
this message. A message-driven bean is an enterprise bean that allows J2EE applications to
process messages asynchronously. It acts as a JMS message listener, which is similar to an
event listener except that it receives messages instead of events. The messages may be sent
by any J2EE component, an application client, another enterprise bean, or a Web component,
or by a JMS application or system that does not use J2EE technology.


Pages:
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324