This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Frankly that sounds like an awful idea: calling static methods on *business* objects to interact with the databse. Where do I begin in describing what's wrong with this approach.
Firstly: static methods are effectively global so you've made you're entire app dependent on those classes.
Second: You've hard coded your dependency on those classes: you couldn't for example use another object that implements the same interface to substitue: how do you test? How do you migrate to another environment?
Third: Well third you're using EJBs but then let's just say EJB CMP is an abomination and BMP is worse...
Have look at Hibernate which is a brilliant ORM library: and in case you're desperate to stick with EJB (some kind of masochist huh?) then a) you can use Hibernate from Stateless Session beans and b) Gavin King, the lead dev for Hibernate, is also on the EJB 3.0 CMP committe and reports EJB 3.0 CMP will look an awful lot like Hibernate.
If JavaRanch had sigs mine would say: Burn EJB and their creators!
Edward, JavaRanch actually does have sigs. If you edit your profile, it's the last item in the first section.
Joined: Oct 05, 2003
Originally posted by Jeanne Boyarsky: Edward, JavaRanch actually does have sigs. If you edit your profile, it's the last item in the first section.
Yeah I know: I just thought my comment would be funnier if I pretended they didn't. Kind of like when Roger rabbit escapes from the handcuffs and Bob Hoskyns asks him why he didn't do it earlier: "because it wasn't funny then.". Oh well maybe not
author & internet detective