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

Moderator: admin

Post Reply
ETS User

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

Post by ETS User »

I think that this is not correct. I didn't find it in the specification. And in the Oracle documentation:

Code: Select all

Around-invoke interceptor methods can have public, private, protected, or package-level access, and must not be declared static or final.
23C70

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

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

Post by admin »

Hi,
Interceptors are governed by a separate specification (Specification : JSR-000318 Interceptors ("Specification") ) and this specification says the same.

EJB 3.1 refers to this specification for general rules of interceptors in Section 12.1, where it says, "The general rules for defining Interceptor classes, their lifecycle, and associated metadata are described in a separate Interceptors document. This chapter describes the set of requirements that are specific to the use of Interceptors with Enterprise JavaBeans."


HTH,
Paul.
If you like our products and services, please help us by posting your review here.

Guest

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

Post by Guest »

So, the wrong answer is marked as correct, isn't it?

I see that the question bank recognizes the first as correct (public), whereas the specification for Interceptors says that the last one is correct (public, nothing (i.e package access), protected, or private).

Are you going to correct it, or have I misunderstood something here?

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

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

Post by admin »

Well, this sure is confusing...

EJB 3.1 Specification Section 12.1 says, "The programming restrictions that apply to enterprise bean components apply to interceptors as well. See Section 21.2.2"

In Section 4.9.2, it says, "The class must be defined as public, must not be final, and must not be abstract. The class must be a top level class." I am not sure if this can be construed as a programming restriction in addition to what are specified in Section 12.2.2.

There seems to be some ambiguity on this.
If you like our products and services, please help us by posting your review here.

gurpreet_asrgndu
Posts: 55
Joined: Thu Jan 03, 2013 7:51 am
Contact:

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

Post by gurpreet_asrgndu »

i'm not able to understand why or where is the ambiguity. the explanation says:

The programming restrictions that apply to enterprise bean components apply to interceptors as well.

but in the question they are talking about access modifier of business METHOD interceptor and NOT class. so in my opinion there is no ambiguity whatsoever of any kind.

himaiMinh
Posts: 358
Joined: Fri Nov 29, 2013 8:26 pm
Contact:

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

Post by himaiMinh »

According to Interceptor 1.1 specification p. 5,
Around-invoke method can have public , private, protected or package level access.
Also, for the information,
Around-timer methods can have public, private, protected or package level access.
Both cannot be declared as static or final.

aazizi.tarik
Posts: 31
Joined: Sun Dec 27, 2015 1:47 pm
Contact:

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

Post by aazizi.tarik »

I think, the quotes mentionned by himaiMinh should be added to the explanation, they are very important

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

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

Post by admin »

It is already mentioned in the explanation.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests