users@jersey.java.net

Re: [Jersey] Jersey and JPA best practices?

From: Julio Faerman <jfaerman_at_gmail.com>
Date: Thu, 18 Dec 2008 08:54:38 -0200

Well, i am using Jersey + JPA + Spring, so the EntityManager gets
injected using the @PersistenceContext annotation.
Works fine for me.

On Thu, Dec 18, 2008 at 7:46 AM, Florian Hars <hars_at_bik-gmbh.de> wrote:
> What is the best way to use jersey with JPA?
>
> I found most of the necessary magic incantations (like the
> WEB-INF/classes/META-INF/persistence.xml madness and telling glassfish
> not to throw "java.lang.AbstractMethodError:
> org.postgresql.jdbc3.Jdbc3Connection.getClientInfo()Ljava/util/Properties"
> by setting JDBC30DataSource to true in the properties of the pool) and now I
> can ask Persistence to give me an EntityManagerFactory and it will do so.
>
> But what is the best way to manage these ManagerFactories and their assorted
> Managers? I can't seem to find the right set of annotations to get
> container managed persistence to work, do I have to write my own
> EntityManagerFactoryManager?
>
> Any hints/tips/experiences?
>
> - Florian.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>