• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Create Exception

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Page 549 in HFEJB says that when a CreateException is thrown the client cannot be certain that the bean was not created, because the exception might have
happened after the transaction commited. If that is the case then how do you handle this scenario in applications using entity beans? Do you code the client so that whenever a createException is thrown you check whether entity was created??

Thanks,
Arun N
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Arun,
I guess, in entity bean scenario, you use transaction to create/insert a row
in the data base, so that should give you an idea wether transaction rolled back or successful. But you may want to do some thing in ejbPostCreate as well to make sure the entity is there since it will be called right after ejbCreate.

and in session bean scenario, I guess there is nothing we can do till you get some kind of exception when you try to call methods on your component interface (either NoSuchObjectException if atleast when there are stubs but not the bean instance or RemoteException/EJBException when there is a problems creating stubs itself).

Thanks,
Ugender
[ September 21, 2006: Message edited by: Ugender Rekulampally ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic