Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] CGLIB Proxy Using Wrapper Policy

Hi All,
  At moment I thought there is no way I can create CGLIB as proxy using
WrapperPolicy. I started studying the code of eclipselink in slightly more
detail and I found my way out. But somebody in the eclipselink team has to
explain me in slightly more detail.

I removed the one to one indirection policy and added 
1) cd.getInheritancePolicy().setDescribesNonPersistentSubclasses(true);// on
class descriptor

2) cd.getInheritancePolicy().setClassExtractor(new ClassExtractor() {
		@Override
		public Class extractClassFromRow(Record row, Session session) {
				return null; // It should return null to make it work
			}
  });

Making above changes every thing started working fine.:clap:

I am also uploading my eclipselin work space. (I am using eclipselink 2.0.2)
http://old.nabble.com/file/p28791187/wrapperpolicy.zip wrapperpolicy.zip 


-- 
View this message in context: http://old.nabble.com/CGLIB-Proxy-Using-Wrapper-Policy-tp28780712p28791187.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top