I've just read this and this post to get an idea of how to organize my application. Regarding to the Entity part, there is something unclear to me.
The first post says, to have a session bean entity, to store the data for a user session. I don't like the idea, because I want to have an Entity class only for representing the database structure.
The second post says, it should be used like a pojo in the backing bean, which I like more. But my question is, where to have the session bean to store the current data.
So far I have:
- A CDI backing bean (package: com.myapp.backingbeans)
- A request scoped DAO bean which is injected into the backing bean (package: com.myapp.dao)
- An Entity class which is instantiated in the backing bean (package: com.myapp.entities)
Is there a convention how to name the package or bean which should preserve the current session data? It doesn't belong to any of the above, it isn't a controller and I wouldn't say, that it's not a "helper".