You need @SessionScoped on the subclass?

Surely the CDI engine picks up the annotations of the class and it's
superclasses?


On 12 December 2013 17:39, Howard W. Smith, Jr. <smithh032...@gmail.com>wrote:

> i'm doing something similar in my app.
>
> import javax.enterprise.inject.Default;
>
> @Default
> @Named("pf_addressController")
> @SessionScoped
> public class pf_AddressController implements Serializable {
>
>
> and subclass,
>
> import javax.enterprise.inject.Typed;
>
> @Typed
> @Named("pf_ocpAddressController")
> @SessionScoped
> public class pf_OCPAddressController extends pf_AddressController {
>
>
> are you finding it necessary to add @ApplicationScoped, and/or do you
> prefer to not be required to add @ApplicationScoped to the subclass?
>
>
> On Thu, Dec 12, 2013 at 11:41 AM, James Green <james.mk.gr...@gmail.com
> >wrote:
>
> > Really really lazy question that I don't see an immediate answer on
> through
> > Google.
> >
> > @ApplicationScoped
> > class MyClass {
> > ...
> > }
> >
> > class MySubClass extends MyClass {
> > }
> >
> > Does MySubClass get to be @ApplicationScoped?
> >
> > Thanks!
> >
> > James
> >
>

Reply via email to