Home > Articles > Programming > Java

  • Print
  • + Share This
From the author of


Getting up and running with JPA need not be too difficult; you follow some fairly straightforward steps. Even the annotations are (for the most part) reasonably comprehensible. It's worth noting that not all organizations are sold on the idea of Java annotations, however. Many organizations prefer to use the tried-and-true approach of external XML files.

Java annotations are pretty much on the leading edge of the language. My own feeling is that annotations are very powerful, but really close to the code! In fact, annotations are part of the code. While the community is increasingly moving in the direction of annotations, this is perhaps somewhat at odds with the notion of decoupled solutions. I don't doubt that annotations will be adopted aggressively across the industry. In fact, I've even worked on projects that have used annotations to produce impressive systems fairly rapidly. The one issue I have with annotations is that they can result in problems that are very difficult to solve; for instance, transaction propagation.

In this article, you've seen how to build an entity class and how to instantiate and manipulate instances of that entity. Setting up the necessary database infrastructure is also not too difficult—at least, for getting a feel for the area with HSQLDB.

I hope that I've at least demystified the area of Java persistence and provided a starting point for delving more deeply into this important topic.

  • + Share This
  • 🔖 Save To Your Account