Unstable Terrain

Software development in the real world

Efficient Singletons in legacy code

leave a comment »

The app I’m maintaining is not Spring-enabled so I am faced with the possibility of writing code for singleton objects. To my mild surprise, I discovered that Java 5 has made singleton creation considerably less bug-prone. There’s also better practices for double-checked locking, if your code (attempts to) swing that way.

Advertisements

Written by Trent

August 30, 2011 at 11:25 am

Posted in Software Development

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: