Speaker Topics - No Fluff Just Stuff

Enterprise JPA & Spring 3.0 - Tips and Tricks for JEE Persistence

As with many technologies, the basics are easy. The hard part comes when the developer needs to do sophisticated integration, development, and testing as part of an enterprise application. A large enterprise application requires the developer to think of issues that affect the development, scalability and robustness of the application. This presentation will cover the advanced topics described below with a focus on the new persistence features in Spring 3.0 and JPA 2.0.

A large enterprise application often will have several sub-projects that each contain their own JPA persistence unit. This opens up a number of questions around how to organize the persistence units and how the code between sub-projects should interoperate. Developers will gain insight into these issues and will see a couple of solutions using live code examples.

Many enterprise applications require integration with an application server's JTA mechanism. JTA integration allows for JPA components to work with container managed transactions and distributed transactions. A typical usage scenario for JPA & JTA is this: read from a database using JPA, perform some business logic, put a message on a queue, write to the database (again using JPA). A JTA transaction allows you to ensure that the entire set of operations is committed or a rollback is performed. In this presentation, the developer will understand the limitations and configuration of using JTA and JPA together ? primarily through real code examples.

Once unit tests are written, developers often gloss over doing fine-grained integration testing just for their persistence layer. Integration testing with JPA means simply one thing: running your JPA components against your target database, for example, Oracle. Overlooking this aspect leads to problems being discovered later in the test cycle (UAT for example) and makes it more difficult to find and fix bugs. This presentation will use live code examples to explain a strategy for getting integration testing for free by reusing unit tests.

Using optimistic locking versus pessimistic locking seems clear cut to most developers. However, a full understanding of the issues with using pessimistic, or datastore, locking is required before making this decision. Developers will get information in the trade offs when using strategy or the other, and how these strategies can be used together with the same persistence unit.


About Pratik Patel

Pratik Patel is a Java Champion and developer advocate at Azul Systems and has written 3 books on programming (Java, Cloud and OSS). An all around software and hardware nerd with experience in the healthcare, telecom, financial services, and startup sectors. He's also a co-organizer of the Atlanta Java User Group and North Atlanta JavaScript meetup, frequent speaker at tech events, and master builder of nachos.

More About Pratik »