Information Technology Reference
In-Depth Information
Remember that CDI is called upon initialization, so always inject the manager but not the
RuntimeEngine instance.
Tip
For the RuntimeEnvironment injected instance in CDI, you could use multiple an-
notations for the different runtime manager types. The following code is completely valid
and often used in test cases:
@Produces
@Singleton @PerProcessInstance @PerRequest
public RuntimeEnviornment createEnv() {
return RuntimeEnvironmentBuilder.Factory.get().
newDefaultBuilder().get();
}
Search WWH ::




Custom Search