Hello Everyone,
Im using Xwiki version 13 and Tomcat version 9.
i wrote some java classes. I register them to Component Manager by adding their name into components.txt
I have used some CDI bean Annotations in my classes such as @Inject ( i inject one of my classes into another of my Classes) and @RequesScoped for one Method.
the only xml files that i have are persistence.xml (because i use javax.persistence packages) and pom.xml
I dont have any beans.xml but it works very good. Fo example Inject annotation works fine.
How is it possible that whithout any beans.xml file i can use CDI beans in Xwiki? I assume that my classes are CDI beand because these Annotations that i wrote work very good.
The packages that i used for these annotations are
javax.inject.Inject
javax.enterprise.context.RequestScoped
This project is my Bachelor Project and i have to explaine why and how.
Can somebody please tell me how it is possible?
@surli@vmassol Thank you both for the help. i understand how @Inject works.
and about @RequestScoped : i didnt use it for the whole class. i just used it for one Method in the Class and it works. what is your opninion about it?
Does it mean that CDI Scopes work in Classes that isnt CDI bean?