JBoss Community

Deferring instance creation/injection to CDI

reply from Marius Bogoevici in EJB 3.0 Development - View the full discussion

Restarting the discussion. In summary, what Weld/CDI needs is:

 

1) EJB defers instance creation to an external component

    - Weld deployer provides the hook for instantiating the  components and will:

             a) invoke the applicable CDI constructor of the EJB class

             b) apply decorators on the EJB

             c) *not* apply interceptors on the EJB - for now, this remains a responsibility of the EJB container

 

2) EJB container provides a hook for preprocessing interceptors after instantiation. The main reason is that EJB interceptors may be CDI-injected

 

(note: could we reuse the same mechanism as for EJB instantiation, since it boils down to producing an instance of the class? )

Reply to this message by going to Community

Start a new discussion in EJB 3.0 Development at Community