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

Moderator: admin

Post Reply
rkbansal83
Posts: 33
Joined: Sat Nov 24, 2012 8:52 am
Contact:

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

Post 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?

admin
Site Admin
Posts: 10386
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

Not eligible means the specification does not permit this.

HTH,
Paul.

rkbansal83
Posts: 33
Joined: Sat Nov 24, 2012 8:52 am
Contact:

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

Post by rkbansal83 »

if specification does not permit this , how should container behave in this ? will it allow the deployment ?

admin
Site Admin
Posts: 10386
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests