JBoss Community

Deferring instance creation/injection to CDI

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

Andrew,

 

You're right about the creation of the instantiatior instance, but it's still a globally-defined bean and the problem, the way I see it, is that you can't have every single deployment replace the global "org.jboss.ejb3.BeanInstantiator" bean for two reasons: a) not every EJB3 deployment is a CDI deployment

and b) Weld bean instantiators need to be created per-deployment unit (as the info they need for instantiating

a particular EJB is specific to the deployment archive that the EJB is defined in).

 

But now that I'm looking at this again, I have trouble finding an easy way of having a deployment-specific BeanInstantiator being created by the MC and passed onto the EJB3Deployment, since the latter is not an MC bean itself. So I'll try to solve this from within weld-int, but I'm a bit wary of deployer ordering issues.

 


 


Reply to this message by going to Community

Start a new discussion in EJB 3.0 Development at Community