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.