wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes CMP and ObjectNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "CMP and ObjectNotFoundException" Watch "CMP and ObjectNotFoundException" New topic
Author

CMP and ObjectNotFoundException

Andreas Amstutz
Greenhorn

Joined: May 16, 2002
Posts: 2
Hi all,
I have this session bean method, which creates an order - and on success sends a msg to a JMS-queue.
OrderLocalHome ohome = getOrderLocalHome( );
OrderLocal order = ohome.create( userId, orderDate );
...
JMSUtil.sendToJMSQueue( JNDINames.QUEUE_ORDER, order.getOrderUId, false );
Some time later the OrderProcessorMDB gets the msg and, among other things, tries to modify the before created order.
Here do I get the "ObjectNotFoundException" for orderHome.findByPrimaryKey().
But there is an order with the corresponding PK in the database.
When I place additional orders the OrderProcessorMDB.onMessage() never sees the least created order.
That means ohome.findAll() allways returns a collection not containing the very latest placed order.
I simply don't get!
Any ideas?
Thanks, Andreas
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CMP and ObjectNotFoundException