File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CMP and ObjectNotFoundException

 
Andreas Amstutz
Greenhorn
Posts: 2
  • 0
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic