Yes sure, I'm currently using a construct where I disable CDI for the EJB-JAR and deploy a second jar with CDI enabled and a resource provider class that does the following for each EJB in the first jar:
@Produces
|
@EJB(lookup="java:global/test/ShopDAO")
|
private ShopDAO shopDAO;
|
Then I set a dependency to the EJB-JAR and a dependency from my WAR to the resource provider JAR. This way I can use @Inject for the DAOs without having CDI enabled for the EJB-JAR.
Admittedly, this is just a workaround (maybe also an ugly one) but it works. The only drawback for me is that I can't use CDI in my EJB-JAR.
|