When I was doing some work with OpenJPA, I found there is a possible memory leaking issue when OpenJPA is used for data access without the proper configuration of the parameter of auto detach (openjpa.AutoDetach).
The scenario that the memory issue may happen:
One EntityManagerFactory and One EntityManager are used throughout the whole session;
The session contains [...]
Java beans in Spring can also have their collection properties populated in the beans.xml file. The collection properties here mean things like List, Map and Array.
For example, if you want to create a JPA EntityManagerFactory with a set of connection properties, these properties can be configured in beans.xml like this:
<?xml version="1.0" encoding="UTF-8"?>
Recently a lesson was learned about the proper use of Java JPA to persist a large number of records into database in a batch process.
Some times it is necessary to load the records line by line from a large file and insert into the database table. There can be several ways to do this:
Use the [...]