openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter" <kwsut...@gmail.com>
Subject Re: Non-enhancement of Entities (OPENJPA-293) questions
Date Tue, 31 Jul 2007 22:26:45 GMT
Thanks, Patrick.  More comments below...

> 1)  How does this automatic persistence-capable feature mesh with the

> > automatic container enhancement of Entities?  That is, I would hope that
> if
> > an application server (ie. Container) is in the picture, then this new
> > automatic persistence-capable feature stays dormant.
>
> Currently, the automatic PC work will happen first in a Java EE 5
> environment.


Hmmm... I don't think I like this.  Even if the container enhancement of the
Entities would override the automatic PC proxies, the automatic PC would
just be extra overhead that would not be required.  I would think that we
would not want this automatic PC feature to be in effect when we are running
with the container managed environment.  Am I missing something that would
make this extra processing desirable?

> I wouldn't want to
> > attempt to mix these two environments.  If the container misses the
> > enhancement of an Entity (due to a bug or something), I wouldn't want
> this
> > new feature to kick in and possibly confuse the runtime environment of
> the
> > container and the associated OpenJPA runtime.
>
> I didn't put any code in place that disables this hybrid mode. It's
> definitely doable, though.


Okay.  Might need that per my earlier comment.

> 2)  Is there a means to turn off this new feature?  For example, suppose I
> > have an existing OpenJPA environment where I am either statically or
> > dynamically enhancing the Entities and I'm happy with this setup.  But,
> then
> > I upgrade to a new version of OpenJPA with this new automatic
> > persistence-capable feature and I start to get difficult-to-diagnose
> > problems because some of my classes were pre-enhanced while others used
> this
> > new feature.  I would like the ability to turn off this new feature if I
> > wish to run solely with the enhancement mechanism.
>
> I can't think of any environment in which only enhancing some classes
> would cause a problem. However, yes, the feature can be turned off, by
> specifying a javaagent with the flags set appropriately.
>
> We could add a configuration option that would influence both this and
> your point #1.


Sounds good.  I think we need this to be configurable.

> 3)  To that end, I would assume that this new automatic
> persistence-capable
> > feature is the default action since we want the out-of-the-box
> experience to
> > be as easy as possible.
>
> Yes, it's the default. The QoS that you get depends on the version of
> Java that you're running; things will work better in Java SE 6, or in
> Java SE 5 + a javaagent setting.


Sounds good.

> 4)  What are we going to call this new automatic persistence-capable
> > feature?  :-)  I think we were just getting our users (existing and
> > potential) used to the "enhancement" concept and now we're throwing in a
> new
> > wrinkle.  Maybe you've already nicknamed the support.  I just couldn't
> find
> > a reference to it.
>
> I haven't come up with a name, but I'm not convinced that we need one
> in the long term. Instead, we need to change our docs etc. to make it
> clear that enhancement is optional. (I've done some work to that end
> already.) I'm open to suggestions, though.


You're right.  It's the lack of the enhancement step that is the feature.  I
guess I was thinking more along the lines of what we were going to call it
internally.  Maybe we just coined it "automatic pc"...  :-)

Thanks for your quick reply!
Kevin

-Patrick
>
> On 7/31/07, Kevin Sutter <kwsutter@gmail.com> wrote:
> > Patrick,
> > I haven't had the time to study all of your proposed changes for
> OPENJPA-293
> > and the related Issues, but I was wondering if you could enlighten my on
> a
> > couple of topics...
> >
> > 1)  How does this automatic persistence-capable feature mesh with the
> > automatic container enhancement of Entities?  That is, I would hope that
> if
> > an application server (ie. Container) is in the picture, then this new
> > automatic persistence-capable feature stays dormant.  I wouldn't want to
> > attempt to mix these two environments.  If the container misses the
> > enhancement of an Entity (due to a bug or something), I wouldn't want
> this
> > new feature to kick in and possibly confuse the runtime environment of
> the
> > container and the associated OpenJPA runtime.
> >
> > 2)  Is there a means to turn off this new feature?  For example, suppose
> I
> > have an existing OpenJPA environment where I am either statically or
> > dynamically enhancing the Entities and I'm happy with this setup.  But,
> then
> > I upgrade to a new version of OpenJPA with this new automatic
> > persistence-capable feature and I start to get difficult-to-diagnose
> > problems because some of my classes were pre-enhanced while others used
> this
> > new feature.  I would like the ability to turn off this new feature if I
> > wish to run solely with the enhancement mechanism.
> >
> > 3)  To that end, I would assume that this new automatic
> persistence-capable
> > feature is the default action since we want the out-of-the-box
> experience to
> > be as easy as possible.
> >
> > 4)  What are we going to call this new automatic persistence-capable
> > feature?  :-)  I think we were just getting our users (existing and
> > potential) used to the "enhancement" concept and now we're throwing in a
> new
> > wrinkle.  Maybe you've already nicknamed the support.  I just couldn't
> find
> > a reference to it.
> >
> > Thanks,
> > Kevin
> >
>
>
> --
> Patrick Linskey
> 202 669 5907
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message