Using JDO in Message-Driven Beans


In terms of the JDO issues, message-driven beans are identical to stateless session beans. The EJB container supports both CMT message beans and BMT message beans. The message bean has only one business method, the onMessage method.

Although no examples are provided in this book, to use JDO with a message-driven bean, follow the usage outlined for the corresponding type of stateless session bean. In a BMT message-driven bean, the persistence manager and its persistent objects can be cached for the life of the bean. In a CMT message-driven bean, the persistence manager must be obtained at the beginning of each invocation of the onMessage method and closed at the end. Persistent objects can be cached as long as the persistence manager remains open.




Using and Understanding Java Data Objects
Using and Understanding Java Data Objects
ISBN: 1590590430
EAN: 2147483647
Year: 2005
Pages: 156
Authors: David Ezzio

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net