(0 comments, 17 posts)
This user hasn't shared any profile information
Posts by Jasper
A quick’n dirty tutorial-by-example for Hibernate: (Using one table, an Oracle9+ database and Hibernate2)
1) download the Hibernate distribution
2) put these jarfiles in /WEB-INF/lib:
hibernate2.jar (hibernate core) cglib-full-2.0.2.jar (runtime class-enhancing) dom4j-1.4.jar (xml reading) ehcache-0.9.jar (objectcache) c3p0-0.8.4.5.jar (connectionpool) jta.jar (transactions) (more…)
Years ago, i believe Q4-2000, we made a website that almost from the day it went live had to serve some rather heavy content with 30.000 hits a day. We finally settled on a cluster of 3 Tomcat-4 servers, 2 MySQL DBs, some homebrewed caching (site was read-mostly), some light TX-management and straight JDBC with (cached) prepared statements. That’s it. Surprisingly, the performance was great! Nowadays EJBs would probably be used for this, but i’m still not convinced why.
I have the feeling that there is indeed some threshold in the level of importance of a managed environment/container for a project, above which the use of EJBs over other frameworks is justified, but i believe the threshold is much higher than should be expected from the percentage of applications using them. Any thoughts on this?
For a very extensive comparison between seemingly all the O/R mapping tools known to mankind check this wiki page. Perhaps a relevant observation: despite the zealoting, Toplink, OJB and Hibernate (by far _the_ most popular ORM-tool, and the basis for EJB3) all seem to offer roughly the same functionality. And actually, the XML configfiles also don’t look all that different to me either..
Some notable differences/facts:
- Hibernate has a big following, development continues at a rapid pace. Free, OS, but no GUI except for some crude 3rd party tool
- OJB has a JDO implementation, the other two have not (for what it’s worth, since the JDO movement seems to be running out of steam). Also OS and free as in beer. GUI under development.
- Toplink doesn’t support MySQL, PostgreSQL or SAP-DB like the other two. It does have a pricetag but also a nice GUI
The Eclipse webtools subplatform is live, with two initial code submissions from Lomboz and IBM. More info here.
The submission by IBM is looking _really_ good: it’s like a free version of WSAD (WebSphere Studio Application Developer). Must delve deeper into this before making any conclusive comments though.
While on topic (well actually not at all): we might consider looking into the Spring framework, a lightweight container that takes care of things like transactions and decoupling of code (created by Rod Johnson of ‘Expert one-on-one J2EE Development’ fame) which has gotten a lot of attention in the J2EE communitiy lately. Click here for a short showcase/tutorial.