JPA and desktop apps

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема JPA and desktop apps
Дата
Msg-id 4C47B5F7.4050303@postnewspapers.com.au
обсуждение исходный текст
Ответы Re: JPA and desktop apps
Re: JPA and desktop apps
Список pgsql-jdbc
Hi all

This is mildly OT, so please ignore unless you're interested in and work
with PostgreSQL via JPA/Hibernate/EclipseLink/etc in a desktop app setting.

Ages ago, I asked here if others were using JDBC directly to access Pg
from their java apps, or if they were using an ORM. I sought advice.
Many suggested that an ORM was a strongly preferable option, and partly
as a result of that advice I ended up using the JPA interface (with
Hibernate powering it) for my database access in my Swing app.

I've now concluded that, while it seems great on the surface, that
approach is absolutely awful, because of issues with detatched entities,
lazy property fetching, and the need to run database work on a non-EDT
thread to avoid UI stalls/freezes and repaint delays.

More details here:

http://soapyfrogs.blogspot.com/2010/07/jpa-and-hibernateeclipselinkopenjpaetc.html

Anyway, since folks here advised me to go for an ORM like Hibernate, I'm
curious: How do you handle the need to avoid blocking on database access
in your Java GUI apps, while lazily fetching properties of entities to
avoid downloading half the database whenever you query it for anything?

--
Craig Ringe

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Radosław Smogura
Дата:
Сообщение: Re: Binary protocol support for JDBC
Следующее
От: Samuel Gendler
Дата:
Сообщение: Re: JPA and desktop apps