EhCache implementation of OpenJPA caching

I usually use Hibernate, which supports a number of caching implementations (such as EhCache, oscache, JBoss, etc). My most recent project had a dependency on a product which has a dependency on OpenJPA, and OpenJPA only has it’s own built in implementations of a query cache and a data cache. I like to have one … Continue reading EhCache implementation of OpenJPA caching

One HTTPS site per IP address… or may be not?

I randomly ran across SNI (aka RFC 4366) tonight. It’s a technology that has been under development since before 2000 that allows the client to tell the server what domain it’s visiting before the server sends the certificate. The history is fascinating! The situation today is that SNI is not here yet. OpenSSL will support … Continue reading One HTTPS site per IP address… or may be not?

Why would a cache include cookies?

Ehcache’s SimplePageCachingFilter caches cookies. And that baffles me… why would a cache include cookies in it? I ran into the interesting situation where servlets, interceptors, and all those other Java goodies were writing cookies for purposes like the current browsing user’s identifier so it could track that user on the site and keep track of … Continue reading Why would a cache include cookies?

One instance at a time with PID file in Bash

Often times, I only want a script to run one instance at a time. For example, if the the script is copying files, or rsync’ing between systems, it can be disastrous to have two instances running concurrently, and this situation is definitely possible if you run the script from cron. I figured out a simple … Continue reading One instance at a time with PID file in Bash

HTTP Caching Header Aware Servlet Filter

On the project I’m working on, we’re desperately trying to improve performance. One of the approaches taken by my coworkers was to add the SimplePageCachingFilter from Ehcache, so that Ehcache can serve frequently hit pages that aren’t completely dynamic. However, it occurred to me that the SimplePageCachingFilter can be improved by adding support for the … Continue reading HTTP Caching Header Aware Servlet Filter

Preventing java.lang.OutOfMemoryError: unable to create new native thread

Artifactory is a Maven repository manager that does a lot of really useful things, such as cache maven artifacts (which saves external bandwidth and makes downloads faster) and stores our own artifacts (such as 3rd party software that can’t be on a public maven repository for licensing reasons). I recently upgraded from Artifactory 1.2 to … Continue reading Preventing java.lang.OutOfMemoryError: unable to create new native thread