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

Thx Tom your answers are elborate and precise.

still one more thing :

the RCP sample from eclipse link is used the non standart method to hook into the classloader ?

"We leverage that behavior to allow weaving at runtime"

is this behaviour in the RCP eclipse link sample ?

Cristian




--- On Wed, 1/7/09, Tom Ware <tom.ware@xxxxxxxxxx> wrote:

> From: Tom Ware <tom.ware@xxxxxxxxxx>
> Subject: Re: [eclipselink-users] Re: rcp, osgi, and dynamic weaving
> To: "EclipseLink User Discussions" <eclipselink-users@xxxxxxxxxxx>
> Date: Wednesday, January 7, 2009, 5:29 PM
> 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?
> 
> -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