I was recently tasked with installing JBoss 4.2 on Centos/RHEL 5. I found the experience remarkably difficult, so I figured I should share it for my own future reference, and hopefully to also save the sanity of whatever other poor souls are tasked with the same project. Start off with RHEL 5 or Centos 5 … Continue reading Install JBoss 4.2 on Centos/RHEL 5
Compression (deflate) and HTML, CSS, JS Minification in ASP.NET
As I’ve already demonstrated, I like performance. So I cache and compress a lot. When I was put onto an ASP.NET project at work, I obviously wanted to optimize the site, so here’s what I did. Taking some hints from Y! Slow, I decided I wanted to: Get rid of all the MS AJAX/toolkit javascript, … Continue reading Compression (deflate) and HTML, CSS, JS Minification in ASP.NET
Hibernate Deep Deproxy
A common problem faced with using ORMs that use lazy loading is that the objects returned by the ORM contain (obviously) lazy loading references, so that you need an ORM session to access those objects. For example, if you have a “Person” class, that contains a “mother” property, when you do “person.getMother()”, the ORM will … Continue reading Hibernate Deep Deproxy
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
IPv6 Setup
I received an email today from Jeremy Visser asking me how my blog is set up for ipv6. So intarwebs, here’s how my system works. The server that hosts this blog is sitting in my living room connected via a router to Comcast cable Internet access. It runs a bunch of services, such as ejabberd … Continue reading IPv6 Setup
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