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

Moderator: admin

Post Reply
johnlong
Posts: 185
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

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

Post by johnlong » Fri Jun 02, 2017 1:14 pm

Define a local interface for localMethod and a remote interface for remoteMethod and have the bean implement both the interfaces.
Would not it be necessary in case of implementing two interfaces to annotate both of interfaces with @Local and @Remote or put those annotations with the reference to interfaces on bean class itself?

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

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

Post by admin » Sat Jun 03, 2017 12:03 am

Yes, annotations are a part of defining a local or remote interface or of defining a bean. Just like import statements are.
If you like our products and services, please help us by posting your review here.

johnlong
Posts: 185
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

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

Post by johnlong » Sat Jun 03, 2017 7:53 am

But it is not mentioned in the answer that annotations have to be places, so one can assume that it has not been done, thus considering that the answer as wrong(incomplete).
In exams, we assume (we are told) that imports are in place if not defined explicitly, but we don't have such assumption for annotations. It does not make sense to make such assumption in general.

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

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

Post by admin » Sat Jun 03, 2017 10:11 pm

I am sorry but I do not agree with your point.
The option says, "Define a local interface for localMethod and a remote interface for remoteMethod and have the bean implement both the interfaces."

So it is not really asking you to assume just the annotations. It is asking you to define the whole thing including everything that defining a locale interface entails. This instruction is complete in itself.

If you are asked to define a class, would you need a separate instruction to write package statements, import statements, extends clause, and all other parts that may be required to define that class?

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

johnlong
Posts: 185
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

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

Post by johnlong » Sat Jun 10, 2017 8:47 am

If you are asked to define a class, would you need a separate instruction to write package statements, import statements, extends clause, and all other parts that may be required to define that class?
Class can exist without package, import statements, extends clause, etc, i.e - it still would be valid class

But in our case implementation would not be valid without required annotations. If annotation were optional, I would agree with you.

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

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

Post by admin » Sun Jun 11, 2017 12:02 am

The option says "define a local interface". It doesn't just say, "define an interface". The phrase "local interface" has a specific meaning in this context. You can't define a local interface by just defining an interface. An interface will become a local interface only when all the required elements of a local interface are fulfilled including annotations and/or xml configuration. Same for "remote interface"

So I am sorry but I still disagree with your argument.

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

johnlong
Posts: 185
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

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

Post by johnlong » Sun Jun 11, 2017 9:18 am

Do you mean that this is not testing candidate knowledge in regards to how to define properly local and remote interface, and goes to higher level?
BTW, as I understood EJB 3.2 dropped the requirement for explicit @Local and @Remote annotations?

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

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

Post by admin » Sun Jun 11, 2017 9:47 pm

If you look at all the options, you will see that the question is testing you on whether you know "what" you need to do and not on "how" to do it.
If you like our products and services, please help us by posting your review here.

johnlong
Posts: 185
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

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

Post by johnlong » Mon Jun 12, 2017 9:10 am

I see, thank you.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests