Reputation:
I am newbie in CDI and I want to instantiate CDI bean via my XML files, but not via beans.xml. Is it possible and is it normal? Or maybe I misunderstand CDI concepts?
Upvotes: 0
Views: 411
Reputation:
I found the answer.
A producer method is a method that acts as a source of bean instances. The method declaration itself describes the bean and the container invokes the method to obtain an instance of the bean when no instance exists in the specified context. A producer method lets the application take full control of the bean instantiation process.
Upvotes: 1