Ok so if I chose to use solely hibernate would there be anything wrong with putting code like this into my action?:
factory = (SessionFactory)request.getSession().getServletContext().getAttribute(Hibern atePlugIn.SESSION_FACTORY_KEY); session = factory.openSession(); Transaction tx = session.beginTransaction(); myProspect = (Prospect)session.get(Prospect.class, id); tx.commit(); session.close(); Ultimately I'll have to build some kind of a util class to handle giving me sessions etc.. but in the short term for testing is this proper? Thanks, David ----- Original Message ----- From: "Larry Meadors" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 10:17 AM Subject: Re: iBatis DAO + Hibernate? > I am working in an environment where we are mixing the two. > > My advice to you is to *not* do it. Pick one and use it as it was > intended to be used. > > I personally prefer iBATIS. It is very simple; it plays well with > existing databases; it allows you the flexibility, commodity and > performance tuning of sql; it provides object wrappers for your data. > All while staying in your DAO and out of your application. > > From my experience, if you are using hibernate, you write hibernate > applications, not java applications that use hibernate - even if you try > to wrap it so that it is not used directly. Trust me, we did. If you are > willing to accept that, hibernate may work for you. > > Some other factors to consider: > - How many developers know hql vs sql? > - How much time will it take for a new person to learn the > idiosyncrasies of the tool (and they both have them)? > > Larry > > >>> [EMAIL PROTECTED] 12/16/03 9:40 AM >>> > We're needing to roll out DAO and ORM in our webapp... been evaluating > hibernate and it looks awesome, but we'd like to insulate our app from > that, > has anyone tried using iBatis' DAO layer then plugging hibernate > underneath > that? > -David > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]