Is this correct : If subclass overrides a method and changes the type of the resource injection, it will affect method of the superclass itself?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.
About Question enthuware.oce-ejbd.v6.2.440 :
Moderator: admin
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
About Question enthuware.oce-ejbd.v6.2.440 :
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.440 :
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.
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.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.440 :
Clear. Thank you.
Who is online
Users browsing this forum: No registered users and 96 guests