users@glassfish.java.net

Re: How to package Persistence Unit at Application Level

From: Sahoo <Sahoo_at_Sun.COM>
Date: Thu, 19 Feb 2009 00:29:51 +0530

Where are the classes implementing the remote interfaces packaged?
Actually this question is irrelevant. I don't think those RMI server
side classes can look up the EntityManager using
persistence-context-ref, for they are not Java EE components. They can
only use JPA in Java SE style, where in you use
Persistence.createEntityManagerFactory() to get hold of the EMF and use
it to create EM.

Having said all this, I don't understand why you don't want to use EJB
which would have made your life a lot simpler.

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> I will be using Spring Remoting to access the classes on the server through RMI from a stand-alone client. Those classes are trying to load the EntityManager on Glassfish but the entity manager can't be found when accessing the functionality through RMI. I am trying to get the EM registered at the application level on the server since I will not be invoking the code through servlet or ejb in this case. I am trying to deploy the descriptors in the sun-application-client.xml but have not been able to get it to work. I currently have a persistence archive in the lib directory that contains the persistence.xml.
> [Message sent by forum member 'melodyk' (melodyk)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332720
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>