4 Replies Latest reply on Jan 6, 2013 12:38 PM by Jozef Hartinger

    Extending ManagedBean class

    riboriori riboriori Newbie

      Hi all

      i've developed a custom scope, say CustomScope, by implementing javax.enterprise.context.spi.Context interface, registering it on afterBeanDiscovery in a class that implements javax.enterprise.inject.spi.Extension and put a file named javax.enterprise.inject.spi.Extension a string "com.mycompany.scope.CustomScopeExtension".

      All works fine. But i have a question. When i debug my CustomScope, especially on get(final Contextual<T> component) method or on get(final Contextual<T> component, final CreationalContext<T> creationalContext) method, (the last for the creation of bean instances) i see always that behind the component (of type Contextual<T>) parameter, there is an instance of ManagedBean class of Weld. Now that i want is to know if it is possible extends ManagedBean<T> class in order to see instances of my own extension of ManagedBean class.

      It is possible? What can i do in order to do that?

      Best regards