Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Odd problem with BeansBinding since upgrading Eclipse Link to 1.1 (only with static weaving)

Hi Chris,

  I'm glad you were able to narrow down which setting causes your issue.

Turning eclipselink.weaving.internal off should be fine - 'some additional info below. I would suggest you rely on the defaults for the other properties and therefore use the following property set:

<properties>
       <property name="eclipselink.weaving" value="static"/>
       <property name="eclipselink.weaving.internal" value="false"/>
</properties>

  Internal weaving does the following:

1. Adds logic to clone methods to deal with weaved variables. If you are using clone(), it may cause some issues 2. Caches primary key information and some cache information. This improves performance but has no other effect 3. Adds some methods to get an set variables that avoid reflection. These are also performance-only changes (this change is more recent than 1.1, but you might be seeing it if you were using a nightly or milestone build)

Depending on how much of an issue these things are for you, go ahead with internal weaving turned off, or we can debug further. The next debugging step will involve isolating exactly what change is causing the issue you are seeing, likely by debugging into the weaved classes.

Please feel free to enter a bug related to internal weaving working with BeansBinding. If you do so, please provide some instructions about how to reproduce the problem.

-Tom


t3_chris wrote:
Hi Tom!

These are my results:

----------------------------------------------------------------------
<properties>
      <property name="eclipselink.weaving" value="static"/>
      <property name="eclipselink.weaving.lazy" value="true"/>
</properties>
Application starts, BeansBinding not working
----------------------------------------------------------------------

----------------------------------------------------------------------
<properties>
      <property name="eclipselink.weaving" value="static"/>
      <property name="eclipselink.weaving.lazy" value="false"/>
</properties>
Unable to start the Application, getting tons of exceptions:
Exception [EclipseLink-1] (Eclipse Persistence Services - 1.1.0.r3634):
org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The attribute [typeOfOwnership] is not declared as
type ValueHolderInterface, but its mapping uses indirection.
----------------------------------------------------------------------

----------------------------------------------------------------------
<properties>
      <property name="eclipselink.weaving" value="static"/>
      <property name="eclipselink.weaving.lazy" value="true"/>
      <property name="eclipselink.weaving.internal" value="false"/>
</properties>
Application starts AND BeansBinding is working!!!!
----------------------------------------------------------------------

Just to be sure, I continued with the tests. It turned out, that the
eclipselink.weaving.internal
is the only option which affects Beans Binding, so this is the properties
set which works for me:

<properties>
      <property name="eclipselink.weaving" value="static"/>
      <property name="eclipselink.weaving.lazy" value="true"/>
      <property name="eclipselink.weaving.internal" value="false"/>
      <property name="eclipselink.weaving.changetracking" value="true"/>
      <property name="eclipselink.weaving.fetchgroups" value="true"/>
</properties>

Is there any document which describes what exactly is done by
weaving.internal? Could i leave
it turned off? Will the lazy fetching of all realtionships keep intact?

Best Regards,

chris


Back to the top