OPI Blog
Learn from experts in their fields

Browsing Tags: JPA

Mar 9, 2017
Camel is closing JPA sessions
So I was writing a simple Camel route where I was fetching a JPA-backed entity on one step and then using it on another. While executing that second step, I got this error: org.hibernate.LazyInitializationException: could ...
Mapping JPA entities to external REST resources in spring-data-rest
Quickstart Clone the example project from github and run the following commands: ./gradlew bootRun curl http://localhost:8080/users curl http://localhost:8080/profiles   Great. What does it do? This example Spring Boot project, featuring spring-data-rest, demonstrates how you can ...
Nov 9, 2010
Unit Testing your Persistence Tier code
While writing unit tests is now common, there is still a struggle for writing effective unit tests.  When it comes to an ORM persistence tier framework, a variety of solutions exist.  This article will discuss ...
Jan 25, 2010
Using JPA and JAXB Annotations in the Same Object
Recently, I started working on some projects where I had to prototype various service end point technologies, including REST and AMF.  During this process, I worked out a fairly nice prototype project template that makes ...
Dec 11, 2009
Simplifying JPA Testing with Spring’s PersistenceUnitPostProcessor
At my current client, we are writing an application that is deployed as an ear into Websphere. One of the goals of the project is to write out-of-container tests so that we don’t have to ...