users@glassfish.java.net

Re: How to access EntityManager of a EJB from a WAR? (without using facade pattern)

From: Xavier Callejas <xavier_at_wflogistics.com>
Date: Thu, 4 Feb 2010 09:46:03 -0600

On Jueves 04 Febrero 2010 03:45:06 glassfish_at_javadesktop.org escribió:
> would normally prefer to encapsulate all entity specific queries in a
> manager, that way I can keep queries and other persistence related
> functionality in one place, makes it easy to maintain and can be reused by
> multiple clients.

I think I will go that way too.

Anyway, I couldn't find a way to serialize a EntityManager or Query instance
through a remote EJB.

I don't want that clients to connect directly to database, so I will use EJB
to use persistence centralizing persistence in the server.

Other possible solution is to use together with EJB is web services, but I
have to convert JPA entities to JAXB entities, right?

Thank you and rgds.
xavier