We also need the proxies for for managed entities to track the state of non
primitives (Dates, collections etc.).
So in my application, I know that the state of the non primitives will not be changing. All I need OpenJPA to do is extract the value of the non-primitive once when it is creating its insert statement.

It will not proxy with for AutoDetachType.NONE.
I have already set this property, and it allows me to close the entity manager much faster because it does not bother detaching the proxies, but it still attaches proxies during commit, so commit does not run any faster.

-Aron

On 6/15/2011 10:37 AM, Michael Dick wrote:
Rick's right on both counts. TrackChanges doesn't eliminate proxies - it
should just make them no-op.

We also need the proxies for for managed entities to track the state of non
primitives (Dates, collections etc.). I don't think we have code in place
that falls back and does a more thorough comparison if the proxies are not
found though.

Pinaki,

The code changes are definitely untested - it's currently breaks the
TestEnumToKernelConstantMappings test (which is rather banal, but probably
there for a good reason).

I'm not sure what you mean about not having a regression test environment.
This problem would be found in a rather quick maven build. I understand not
having multiple databases available, but running the regression bucket with
derby should be doable.

You can skip the long running locking tests with this arg:
-Dsurefire.excludes.locking=**, if time is a concern.

-mike

On Wed, Jun 15, 2011 at 9:11 AM, Rick Curtis<[email protected]>  wrote:

Javadoc from ProxyManagerImpl

    /**
     * Whether proxies produced by this factory will use {@link
ChangeTracker}s
     * to try to cut down on data store operations at the cost of some extra
     * bookkeeping overhead. Defaults to true.
     */
    public boolean getTrackChanges() {
        return _trackChanges;
    }

It sounds like this property is used to determine whether the proxies are
tracking changes... not to toggle the creation. Adding another property to
the ProxyManager to not use proxies from the get-go makes sense to me.

On Wed, Jun 15, 2011 at 8:58 AM, Kevin Sutter<[email protected]>  wrote:

Hi guys,
Shouldn't this property setting turn off the proxy usage?

<property name="openjpa.ProxyManager" value="TrackChanges=false"/>

That's the way I read the documentation, but it doesn't seem to work that
way.  We still get the proxies created.  Actually, I don't see much
difference in processing whether this is set to True or False.  Is this a
bug, or am I reading the documentation wrong?

Thanks,
Kevin

On Tue, Jun 14, 2011 at 7:53 PM, Rick Curtis<[email protected]>  wrote:

Aren't proxies also used to track changes while a persistence context
is
active?

Rick Curtis



--
*Rick Curtis*


Reply via email to