An open-source, federated content repository

Capture thread-safety intent via annotations

Alex points out the difficulties of knowing whether a class can be used within a concurrent manner, and what we as developers can do when designing and documenting code for thread safety.

I whole heartedly agree with his suggestion to use JCIP annotations. We use them on the JBoss DNA project, and several of us have commented that using the annotations helped us think more about the thread-safety of the code we’re writing.

This, I think, is yet another benefit of using JCIP annotations: they help you better code because they’re a constant reminder of what you intend for the class’ behavior in a concurrent world.
After all, nobody likes those nasty Schroedinbugs and Heisenbugs.

Filed under: techniques

One Response

  1. Stefano Maestri says:

    It’s funny to read this post, since I was just discussing today with a cotributor jcip annotations and how to use them effective in wise project.Great minds 🙂

Leave a Reply

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

You are commenting using your 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

ModeShape is

a lightweight, fast, pluggable, open-source JCR repository that federates and unifies content from multiple systems, including files systems, databases, data grids, other repositories, etc.

Use the JCR API to access the information you already have, or use it like a conventional JCR system (just with more ways to persist your content).

ModeShape used to be 'JBoss DNA'. It's the same project, same community, same license, and same software.



%d bloggers like this: