persistence@glassfish.java.net

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

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Mon, 22 Jun 2009 09:44:42 -0300

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