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

Moderator: admin

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

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

Post by johnlong »

However, injection of such resources follows the Java language overriding rules for the visibility of fields and methods. A method definition that overrides a method on a superclass defines the resource, if any, to be injected into that method. An overriding method may request injection of a different resource than is requested by the superclass, or it may request no injection even though the superclass method requests injection.
Is this correct : If subclass overrides a method and changes the type of the resource injection, it will affect method of the superclass itself?

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

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

Post by admin »

Yes, it is quoted from section 16.2.2 of EJB 3.1 specification.
It is not really affecting the method of superclass. It is affecting the subclass method that is inherited by the subclass. If you use the superclass as a bean, then changes in the subclass will have no affect.
If you like our products and services, please help us by posting your review here.

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

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

Post by johnlong »

Clear. Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests