Apparently the Hibernate folks don't advertise releases to the mailing lists, cause I never knew about this release (happened yesterday) - until I read Erik's blog today. Anyway, there's nothing new to this release, mostly bugfixes. I'll still be updating my projects that use Hibernate, as it's much easier to upgrade often than to try to migrate b/w releases. I've discovered this the hard way with XDoclet and Roller.
Trying to keep up with all these projects, and my affinity for nightly builds begs for me to implement Maven ASAP. I keep checking in JARS to CVS and removing them a week later!
I finally solved the problem I was having where the DBCP Connection Pool in Tomcat kept getting closed. At first, I thought it was happening every 24 hours. After we configured connection logging in Oracle, we discovered it was happening every 2 hours. After posting numerous (likely annoying) messages to tomcat-user and struts-user (with no resolution), I looked up my local Oracle user-group mailing list and fired off a message.
The first (and only) response solved my problem. It said I should check and see if there is a connection timeout on the firewall. Sure 'nuff, 90 minutes. So I wrote a DBPingServlet, coupled with an Ant task to make an HTTP Request to get the servlet, and scheduled it as a cron job. Whalla - the problem is fixed! Thank God - it was annoying to restart Tomcat every 2 hours! Of course, if folks where actually using our application - this would've never been an issue... ;-)
Google has a new service in beta called Froogle. I might just have to use it to find out where to purchase my next online item.
Froogle is a new service from Google that makes it easy to find information about products for sale online. By focusing entirely on product search, Froogle applies the power of Google's search technology to a very specific task: locating stores that sell the item you want to find and pointing you directly to the place where you can make a purchase.
A couple of weeks ago, I mentioned that I was interested in using Log4j's SMTPAppender to e-mail me messages when errors occured in my webapp. I discovered how easy it is a couple of days ago. Here's how to configure it.
1. Add mail
to the log4j.rootCategory in log4j.properties
: log4j.rootCategory=INFO, stdout, mail
2. Add the following configuration settings to log4j.properties
:
# Configuration for receiving e-mails when ERROR messages occur.
log4j.appender.mail=org.apache.log4j.net.SMTPAppender
log4j.appender.mail.To=@ERROR-MAILTO@
log4j.appender.mail.From=@ERROR-MAILFROM@
log4j.appender.mail.SMTPHost=@ERROR-MAILHOST@
log4j.appender.mail.Threshold=ERROR
log4j.appender.mail.BufferSize=1
log4j.appender.mail.Subject=CCT Application Error
log4j.appender.mail.layout=org.apache.log4j.PatternLayout
log4j.appender.mail.layout.ConversionPattern=%p [%t] %C{1}.%M(%L) | %m%n
One question I have is that the ConversionPattern is kinda funky - where the line breaks don't seem to be carried into the e-mail (from exception.printStackTrace()
). Any suggestions for a better configuration are appreciated. The To, From, and SMTPHost are all replaced with values from Ant during the build process.