• Post Reply Bookmark Topic Watch Topic
  • New Topic

user defined exception to be thrown from entity bean

 
ramjcp kris
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ALL

I am using Session Facade design pattern.I need to throw user defined exception from entity beans store method .Can we throw userdefined exceptions from entity bean? if so what will be the type of exception thrown to webtier.when i tried to throw exception from entity beans callby method i,e ejbstore the exception is getting propagated to webtier,but not to session bean.
can any one suggest me how to handle the userdefined exception ,if it is possible to throw from entity bean
 
nandkishor rao
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think that you can catch user-defined exceptions in EntityBean
better to throw a new EJBException() and catch that exception on the client side i.e Session Bean from where you are calling the buisness methods.Here you show a user defined exception.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!