I am making a Java EE application just to use what I learn while reading in the books. I made a simple Entity and a DAO object that do different actions on this Entity such as create, update etc. Then in my EJB I want to use this DAO object so that I later can expose it to JSF etc.
I am having a little problems of understanding how to use objects of different classes in different layers of my application. How do I expose them to each other?
Do I just do as in regular Java SE? Have properties for the different classes and instantiate them in the classes I want? (No probably not, I have seen the use of @Inject and so on, but I do not understand one bit of it. And not when I can use it either)
I would apprciate some text on when/how we use the different annotations and how we connect different layers rather than just some code showing it.
I am on the Java chat if anyone have some spare time =)