I am enhancing during runtime, but with the build-time enhancer. I know that sounds kind of strange, but I am using PCEnhance.run and a custom BytecodeWriter that writes to a custom Class Loader that allows me to add and use the enhanced classes during runtime.

Would this cause managed objects to be proxied? Would it matter if the declared return type is different from the type I specify as targetEntity?

-Aron

On 6/15/2011 4:43 PM, Pinaki Poddar wrote:
Proxies are *not* created for managed objects, in general. This brings me to
my favorite question:
are you enhancing the persistent classes at build-time? If not, please do.
It will save you ton of trouble.

For normal (I mean build-time enhanced) persistence mode, OpenJPA creates
proxies for 'second-class objects' -- the objects that are "managed" by the
runtime in some sense but *could* mutate without OpenJPA knowing about such
mutation. Examples are instance of java.util.Date or java.util.Collection.
OpenJPA proxies them because then it can be aware of their mutation and act
appropriately to capture these changes.



-----
Pinaki
--
View this message in context: 
http://openjpa.208410.n2.nabble.com/Speeding-up-commit-tp6474341p6480502.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to