Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.392 :

Posted: Mon Dec 03, 2012 12:05 pm
by rkbansal83
@ApplicationException
public class MyException extends RunTimeException {

}

If I throw any runtime exception (like above) from any of the life cycle method . I dont see any issue in compiling or deployment of my EJB.

Explaination says
Note that a runtime exception may be application exception (if it is annotated as such @javax.ejb.ApplicationException), in which case it is not eligible to be thrown from a life cycle call back method.

When you say ,its not eligible what does that mean?

Re: About Question enthuware.oce-ejbd.v6.2.392 :

Posted: Tue Dec 04, 2012 6:06 am
by admin
Not eligible means the specification does not permit this.

HTH,
Paul.

Re: About Question enthuware.oce-ejbd.v6.2.392 :

Posted: Tue Dec 04, 2012 1:04 pm
by rkbansal83
if specification does not permit this , how should container behave in this ? will it allow the deployment ?

Re: About Question enthuware.oce-ejbd.v6.2.392 :

Posted: Sun Dec 16, 2012 8:18 am
by admin
rkbansal83 wrote:if specification does not permit this , how should container behave in this ? will it allow the deployment ?
It really depends on the container. It can't be checked at deployment time so I believe the behavior would be unpredictable.
-Paul.