Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2E9E9B8FB for ; Mon, 16 Jan 2012 03:18:54 +0000 (UTC) Received: (qmail 94230 invoked by uid 500); 16 Jan 2012 03:18:53 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 93990 invoked by uid 500); 16 Jan 2012 03:18:36 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Delivered-To: moderator for users@openjpa.apache.org Received: (qmail 55082 invoked by uid 99); 16 Jan 2012 02:14:37 -0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) From: Tomas Pluskal Content-Type: multipart/alternative; boundary="Apple-Mail=_BE6EC759-45CE-4155-ACA4-E83F25CFA1A0" Subject: Using JPA for large object sets Date: Mon, 16 Jan 2012 11:14:07 +0900 Message-Id: <1B0E7F8B-3BDF-46E5-B28E-00FC60AD7B3B@oist.jp> To: users@openjpa.apache.org Mime-Version: 1.0 (Apple Message framework v1251.1) X-Mailer: Apple Mail (2.1251.1) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_BE6EC759-45CE-4155-ACA4-E83F25CFA1A0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Dear OpenJPA community, I am developing a desktop Java (Swing, J2SE) application that handles = large amounts of scientific data (this one: = http://mzmine.sourceforge.net/). The amount of data can go up to tens of gigabytes, so it is not possible = to store all the data as Java objects on the heap. I have no previous experience with JPA/OpenJPA, so I hope to get some = advice from more experienced users. I would like to develop an elegant solution to store the Java objects in = a database and retrieve the data on-demand, ideally with some support = for caching.=20 Searching in the internet I found that OpenJPA combined with Derby might = provide this kind of functionality, but I am not sure if such solution = would be efficient. I played with OpenJPA for a while and I managed to implement a simple = hello-world type of program that creates an instance of an EntityManager = and stores an instance of my class by calling = EntityManager.persist(instance) So far it works. Now I am wondering: is there any easy way how to remove = the object from memory, but keep a reference to it, loading the = persisted data on-demand using the reference? I will appreciate your insights! Tomas =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Tomas Pluskal G0 Cell Unit, Okinawa Institute of Science and Technology Graduate = University 1919-1 Tancha, Onna-son, Okinawa 904-0495, Japan TEL: +81-98-966-8684 --Apple-Mail=_BE6EC759-45CE-4155-ACA4-E83F25CFA1A0--