Just to add to Rick's comments.

Where build time enhancement can really help you is if you run some
acceptance or unit tests before deploying to Glassfish. It's always nice to
test with the same bytecode that you deploy.

That said, it Glassfish should configure the automatic enhancement if you
use a container managed EntityManagerFactory or EntityManager. It's not
required to hook in a class transformer for enhancement if you use the
javax.persistence.Persistence bootstrap class.

So, like Rick said,  taking the time to do build time enhancement can
eliminate one more variant in your environment (and save some headaches).

Hope this helps
-mike

On Thu, Feb 24, 2011 at 2:23 PM, Rick Curtis <curti...@gmail.com> wrote:

> I'd recommend taking the time to setup build time enhancement. You'll save
> on headaches in the long run.
>
> Thanks,
> Rick
>
> On Thu, Feb 24, 2011 at 2:13 PM, baboune <sey...@yahoo.com> wrote:
>
> >
> > H,
> >
> > Sorry for this stupid question but despite reading
> > http://openjpa.apache.org/entity-enhancement.html
> > http://openjpa.apache.org/entity-enhancement.html , and
> >
> >
> http://people.apache.org/~mprudhom/openjpa/site/openjpa-project/manual/ref_guide_pc_enhance.html
> >
> >
> http://people.apache.org/~mprudhom/openjpa/site/openjpa-project/manual/ref_guide_pc_enhance.html
> > , it seems fair to assume that I should not use build time enhancement of
> > my
> > entity beans.
> >
> > Quoting from openjpa manual:
> > "2.2. Enhancing JPA Entities on Deployment
> >
> > The JEE 5 specification includes hooks to automatically enhance JPA
> > entities
> > when they are deployed into a container. Thus, if you are using a JEE
> > 5-compliant application server, OpenJPA will enhance your entities
> > automatically at runtime. Note that if you prefer build-time enhancement,
> > OpenJPA's runtime enhancer will correctly recognize and skip pre-enhanced
> > classes.
> >
> > If your application server does not support the JEE 5 enhancement hooks,
> > consider using the build-time enhancement described above, or the more
> > general runtime enhancement described in the next section."
> >
> > We are running OpenJPA 1.2.2 on GlassFish 2.1.
> >
> > No build time enhancement is required correct?
> >
> >
> > /Thanks
> >
>

Reply via email to