users@glassfish.java.net

Re: Accessing EJB3 Entities remotely

From: <glassfish_at_javadesktop.org>
Date: Thu, 27 Sep 2007 12:38:13 PDT

Shri,

You can find plenty of examples on how to use EM on the client (see for example GlassFish persistence page https://glassfish.dev.java.net/javaee5/persistence/persistence-example.html). But to be able to load a lazy field directly from the client, you'll need a jdbc connection. If you want to avoid all of it, you'll need a layer between the client and the entity. You might want to consider an extended persistence context to be open for a duration of client access, if that duration is not too long (otherwise keeping an EM open will keep the associated resources from being used by others).

Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

http://forums.java.net/jive/thread.jspa?messageID=237451