0

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".

Community
  • 1
  • 1
manban
  • 133
  • 1
  • 19
  • Does this answer your question? http://stackoverflow.com/questions/5697351 – BalusC May 19 '16 at 08:43
  • Thanks for the link! I think the session bean that holds the current states of data for the users will by its functionality fit in a "manager" package. In case the name "manager" isn't usually used for something complete different? – manban May 19 '16 at 10:18

0 Answers0