In My EJB code I was trying to throw an EJBException instead of Custom one,
although I added to 'throws' clause in the remote interface
javax.ejb.EJBException, it still not working properly and I get CORBA
UNKNOWN 0.
I don't know why this is happening, and how can I throw an Exception from my
EJB.
Maybe a small sample would be appreciated.
Thank you
Hrair K.
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Perryn Fowler
Sent: Friday, February 23, 2001 7:59 AM
To: [EMAIL PROTECTED]
Subject: Custom Application Exceptions [ Was: no subject ]
You certainly can - as is covered in the EJB spec
section 12.2.1
your problem is that you need to specify your
exception
in the throws clause of your remote interface. The
container will catch EJBExceptions and throw
RemoteExceptions in their place but it will pass your
application exception straight through so it needs to
be in the remote interface.
(Im surprised you were able to deploy the bean)
cheers
Perryn
>Hi, I have a question about Exception catching in
>EJB. How can I throw a
>custom Exception from my EJB?
<SNIP>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices!
http://auctions.yahoo.com/
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".