Re: Custom ClassLoader

Christian Stein <[email protected]> Wed, 16 Oct 2013 23:34:29 +0200
Newsgroups gmane.comp.java.prevayler
Message-ID <CAJi8+g5_D+0wnMDAU9_CbUqOQnd7m-2FwBMs9ybM7eh=xFVi8Q@mail.gmail.com>
On Wed, Oct 16, 2013 at 11:13 PM, Klaus Wuestefeld <[email protected]> wrote:

> The question is:
>
> Why does the classloader matter when running transient? Does the
> loader instrument the code?
>

The project I'm working on generates the transaction classes and provides
them via a custom class loader. It does not instrument, it adds.
The class loader matters running transient ... because the prevayler
produced by the *static* transient factory method uses the deep copier by
default, and therefore can't restore the transaction objects just written
to memory using the "system" class loader.


> Cant you not load Prevayler itself using your classloader?
>
>
Hm, I tried it. At least by loading the PrevaylerFactory from my class
loader and then calling createTransientPrevayler(P) ... it didn't work out.

I'm preparing a test case and send you the link.

Cheers,
Christian

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk

_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org