Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

When not to user container  RSS feed

 
Rohit Lal
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I was thinking of adding this as a reply to that great discussion on 'When not to use EJB', but dithered because, well, my problem spans only a miniscule section of that topic. Plus, my query faced the possibility of being lost in the deluge of answers in that discussion.
My problem, rather query, is - When querying the d/b, should I use finder methods from my local entities through my session facade? Should I go through the container at all? Why not use a plain DAO for simple queries? I would again make a distinction here - I totally agree on using finders to get the relevant local object in order to make an update. But for the other stuff where you just have to show information on the client - why go through the container?
Wouldn't it make more sense to handle the DAO access and session facade access through a plain java class designated as a business object? Or some other mechanism (JDO perhaps...?) which doesn't use the container?
Which brings me to yet another query - should I be stingy about using the container?
Till now I've only been met with stares and scandalized looks as if I've questioned the very existence of God. I'm a believer - but I need to know that God is not omnipresent.
Rohit
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMO alternative technologies to EJB can fully replace entity beans in most systems (possibly not in systems using truly distributed architecture in all tiers, but such are extremely rare).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!