openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@gmail.com>
Subject Re: Non-enhancement of Entities (OPENJPA-293) questions
Date Tue, 31 Jul 2007 21:10:43 GMT
> 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.

> 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.

> 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.

> 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.

> 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.

-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
View raw message