What CDI implementation is used by CUBA platform ?


I fight with trying to make my @Produces methods working. But suddenly I realized, CUBA is based on plain Tomcat, so no CDI container right ?
In that case I’m curious how you did implement Injections in the platform.

To be more clear, I cannot rely on your pattern with the NAME static field (which works perfectly by the way) to create my beans, because it is a generics.

How can I inject an instance of a class defined this way using CUBA :

EntityRules<E extends Entity>


The standard way with CDI is to define producers methods returning instances with concrete type, like e.g




Hi Mike,

CUBA uses Spring Framework as a container, so it can work on any Java web server. Look at the following section in the Spring docs, it may help you to find substitutes for JavaEE.

Please note that screen controllers are not Spring beans, so CUBA injects dependencies in screens using its own mechanism described here.

Thanks Konstantin, @autowired does the trick.