WG makes a good point about value objects. Network latency can add up quickly, especially when you are talking about three servers (servlet container/CFMX + application server + database server) rather than just two, and then even more so when your servers/clients are in different geographic locations. I have been bitten by this in the past.
Generally speaking, EJBs are a tricky technology that one has to be very committed to to make work. In my experience, they generally don't start paying for themselves until you really start to scale an application, at which point they make a lot of sense. Christian On Thursday, January 16, 2003, at 07:08 AM, webguy wrote: > Hi, quite a good book huh ?;-) I agree with a lot of things Christian > mentioned. I think its the "Fast Lane" rather than "Fast Track" :-) > >> I just finished reading the CRM section of Ben Forta's CFMX/J2EE book >> and am curious about using Entity Beans for database access. The book >> described them as fairly involved to develop and deploy and provided >> relatively poor performance. One of the issues discussed with the >> application, albeit fictional, was the slow response time of the >> Entity >> EJB's. > > I think you may have slightly mis-understood, the comments in the book > (I > think I know the comments you are referring too, if not, excuse me!). > There > is some overhead using EJBs, especially since all the SQL is generated > by > the EJB containers. Of course there is a lot of functionality provided > by > this too. > > In the book, what is discussed is the fact that SOME database access > (especially tabular data) can be slow. The common J2ee way around this > is to > use the Fast Lane read pattern, > http://java.sun.com/blueprints/patterns/FastLaneReader.html > > Another issue talked about in the book was a method of increasing > performance of EJBs by using value objects, > reducing network traffic by creating a object with all your data to > pass to > your EJBs instead of multiple calls e.g. > > > create value object > field1 => value1 > field2 => value2 > field3 => value3 > field4 => value4 > field5 => value5 > > pass object to ejb method myejb.setValues(myvalueobject) > > results in one RMI / network call opposed to > > myejb.setfield1(value1) > myejb.setfield2(value2) > myejb.setfield3(value3) > myejb.setfield4(value4) > myejb.setfield5(value5) > > results in 5 rmi calls. > > There are lots of different way of doing database work in EJB, CMP , > BMP , > JDO , persistence frameworks etc ... also remember the J2EE/MX book > tries to > show Java developers, way the should use CF/Java v's Java alone, and > IMHO, > sometimes falls on the side of CF.. > > WG > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

