I third the suggestion :) But, I would look at the Spring JDBC package. If your going to do naked JDBC, they can make your life a lot easier. I would be using it now myself, except...
I have over the course of a few projects developed four classes that I've used often when I couldn't really justify Hibernate or even iBatis. One is a database connection manager class that all JDBC classes go through. It deals with getting a connection (either created on-the-fly or from JNDI), errors, transactions, etc. I've also developed two other classes that allow the ability to externalize all my queries... I do a simple getQuery(queryID) call and I get back the query, which I can then do parameter replacements on (just like a prepared statement, but it's not), and send it off to the manager to execute. The fourth class is a disconnected ResultSet object that is very handy (and tends to make the application more efficient overall). The reason I'm mentioning these things is that they are not that big a deal for most people to develop, and if you wrote them they would evolve over time and really make your life easier (probably 90% of them were written over the course of two days during one project, then they got tweaked sligthly during a few other projects). I usually wouldn't recommend doing something like this yourself, but it is a great learning experience, and you wind up getting exactly what you need in the end, so it may well be worth it. In any case, don't dismiss JDBC out-of-hand, as many people seem to do these days. You *do* want to look at the alternatives of course, but done correctly, JDBC can be a very good friend. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Thu, January 19, 2006 12:12 pm, [EMAIL PROTECTED] said: > I second the suggestion to start with JDBC. I've written a simple > JdbcReader and JdbcWriter that I use within a DAO for accessing the > database. You can find it at > http://idiacomputing.com/moin/JdbcPersistence > > - George > >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] >> Sent: Thursday, January 19, 2006 10:17 AM >> To: Struts Users Mailing List >> Subject: [OT] Re: Database Access >> >> >> It appears that you're still a student and you've asked for a >> "...simple >> way to access a database." >> >> My suggestion, start with JDBC. From there, you can >> investigate other >> options including, but not limited to, DbUtils, iBatis, >> Hibernate, EJB >> entity beans, etc. >> >> Scott Ambler has a nice article you might be interested in: >> http://www.ambysoft.com/essays/persistenceLayer.html >> >> -Dennis >> >> >> >> >> Asad Habib <[EMAIL PROTECTED]> >> 01/19/2006 10:10 AM >> Please respond to >> "Struts Users Mailing List" <user@struts.apache.org> >> >> >> To >> user@struts.apache.org >> cc >> >> Subject >> Database Access >> >> >> >> >> >> >> What are the different ways in designing the persistence >> layer so that it >> works with a Struts application? I am looking for a simple >> way to access a >> >> database. Should I use hibernate? Are there any articles online that >> discuss these alternatives and their tradeoffs? Thanks. >> >> - Asad > > --------------------------------------------------------------------- > 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]