persistence@glassfish.java.net

Re: Java SE style use of JPA from an enterprise application

From: Sahoo <Sahoo_at_Sun.COM>
Date: Mon, 22 Jun 2009 20:37:16 +0530

You are right, GlassFish does not deploy all the PUs; it only deploys
those PUs that are actually referenced by any Java EE component. That
explains the situation.

Thanks,
Sahoo

Gordon Yorke wrote:
> Sahoo,
> With TopLink ans EclipseLink Java SE style applications can still
> have access to dynamically woven classes. It really depends on the
> startup. Many application servers deploy the PU on deployment of the
> application. This process ensure the provider has the opportunity to
> enhance the classes. Once enhanced within the application all Java SE
> style access still uses the enhanced classes. Because Glassfish
> delays deployment of the PU on application deployment there is no
> opportunity for the provider to weave the classes.
> --Gordon
>
> Sahoo wrote:
>> Hi,
>>
>> It is my understanding that when an enterprise application uses JPA
>> in Java SE style, entity classes don't get enhanced as a result of
>> which benefits of enhancement (like lazy loading of fields) is not
>> available to such applications. If user wants to have those benefits,
>> then they have to either use JPA in container style or statically
>> enhance their domain classes. Please confirm.
>>
>> Secondly, does anyone know of any EE platform that behaves differently?
>>
>> Thanks,
>> Sahoo