Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Re: rcp, osgi, and dynamic weaving

On Wed, 07 Jan 2009 16:29:48 +0100, Tom Ware <tom.ware@xxxxxxxxxx> wrote:

The most common cause of this issue is serializing an instance of the object from a VM that does not have weaving enabled. Is it possible that is what is happening for you?

I have weaving enabled, cause I have not disabled it. It should be on by default, shouldn't it? Since I moved away from EclipseLink as it took me too long to get it running I cannot provide a screenshot of what goes on from the debugger. You could clearly see the weaved in methods and that the JavaVM ids of the weaved and non-weaved objects (created by new Foo) were not equal.
Running Equinox as the OSGi provider.


-Tom

Philipp Kursawe wrote:
On Wed, 07 Jan 2009 15:26:59 +0100, Tom Ware <tom.ware@xxxxxxxxxx> wrote:

Why not? The classes are weaved when they are loaded. As far as the java VM is concerned the classes are the same for the life of the app.
I have tried it out. It's not working. With EclipseLink weaving in place, the identity of the objects changes. If I have 2 objects of Type Foo and one comes from the database operation like em.find(primary id) then the "em.find(1) instanceof Foo" returns false. The debugger reveals, that the Class of the objects differ. One has the weaved methods in it, and therefore a different identity (Java VM id). Have you actually tried this weaving? I have not got it working and reverted to dynamic-jpa which works out of the box.


-Tom

Philipp Kursawe wrote:
On Wed, 07 Jan 2009 14:36:52 +0100, Tom Ware <tom.ware@xxxxxxxxxx> wrote:

Dynamic weaving is used for several performance enhancing features in EclipseLink. (e.g. lazy loading of ToOne relationships, fetch groups, optimized change tracking, optimized cache lookups)

When enabled, it provides all these features transparently and hence boosts the performance of your application.
Unfortunatly it also changes the identity of objects. You cannot do a instanceof anymore with weave'd objects.
 _______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
  _______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users




Back to the top