Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

The fact that this topic exists...  RSS feed

 
Ernie Stephenson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From my experience, the only type of EJB i've used (with any degree of success) is a stateless session bean (a glorified biz delegate!). I worked on a few projects using session and entity beans(!) a few years back and it was a complete and utter waste of time and money. I can't see the point of having a resonably flexible language like java chained down by mindless, badly thought out 'frameworks'.
The only time I do a transaction is against a database and it's simple enough to daisy-chain a load of DAO's together and let the JDBC layer worry about the 'transactions'. Granted a more distributed application will require a proper 'transactional' model but i've never worked on one that can't get away with a simple database transaction...
J2EE = Servlet API, JDBC, JMS. The rest is a bit rubbish really...

Ernie
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ernie,
I've used CMPs with some success. It saved some development time. The catch is that you have to want to be doing what CMPs are good for.

By the way, JDBC is part of J2SE. SO it can't really be a justification for J2EE.
 
Stan Sokolov
Ranch Hand
Posts: 120
Hibernate IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't say this with such tone. Some EJB CMP projects are pretty successfull. I have participated in two of them. Declarative transactional model is glithering detail of EJB container that could beat plain JDBC without any effort. Please understand in the days when CMP beans came on the scene it was probably unique technologie that solve problem of Java - DB mapping. You can argue that this mapping is overcomplicated and I won't debate this. It is right. But with wizards help it is only matter of couple of hours to create complex DB access layer using CMP beans. Today we have a choice - Hibernate. And my opinion market goes in this direction. But still EJB declarative transaction model is a superb quality
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"The catch is that you have to want to be doing what CMPs are good for."

Stas,
I'm not sure if that comment was directed at Ernie or me. Regardless, I reread my statement about CMPs and want to clarify. CMPs are good for relatively simple operations, especially if updating values. They aren't so good for complex queries involving aggregate functions. It's more of making sure the solution fits the problem rather than trying to use CMPs for everything.
 
Ernie Stephenson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fair enough... But I think the marrage between RDBMS and OO is a rocky one. If you want to persist objects then use an OO database. Nibernate is good, but I am wondering what it is all for when I hear that access to stored procedures will be implemented?
Most of the applications I work on have hundreds of relational tables. Most of these tables can relate to objects. I still think it's a whole lot quicker to stick a course grained DAO over the top and do all the processing on the db (if possible). Good old client-server style.
As for JDBC, fair enough it's not quite j2ee which means that...

J2EE = Servlet API, JMS. The rest is a bit rubbish really...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!