• Post Reply Bookmark Topic Watch Topic
  • New Topic

CMP and ObjectNotFoundException  RSS feed

Andreas Amstutz
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!