Re: [OJB-developers] reference proxies not working
Brought to you by:
thma
From: Jakob B. <jbr...@ho...> - 2002-06-04 17:34:18
|
hi georg, you're right. there's no testcase for reference proxy the problem is caused by the wrong class being used to build the proxy. the bug is fixed by : ... if (rds.isLazy()) { referencedProxy = getClassDescriptor(referencedClass).getDynamicProxyClass(); } ... in method getReferencedObject() of PersistenceBrokerImpl. i'll do some testing tomorrow morning , and check it in if all goes well. hth jakob ----- Original Message ----- From: "Georg Schneider" <ge...@me...> To: "Mahler Thomas" <tho...@it...> Cc: <obj...@li...> Sent: Tuesday, June 04, 2002 4:30 PM Subject: [OJB-developers] reference proxies not working > Hi Thomas, > > I just tried out the new release and I noticed that reference proxies are > still not working due to a bug I mentioned in the following posting > > http://sourceforge.net/mailarchive/forum.php?thread_id=664723&forum_id=4880 > > Please correct me if I am wrong, but there seems to be no testcase testing > reference proxies, so I constructed one and attached it to this posting. > If you run that testcase you should see an IllegalArgumentException being > thrown, which should disappear when fixing the code as mentioned in the > posting (btw, there is a typo in my posting, it should be > referencedProxy=null, and not referenceProxy=null :-) ) > > The get the testcase running you have to do 3 things: > > 1.) put the ArticleWithReferenceProxy.java file from the attachement into > the test/ojb/broker/ directory (the class simply extends Article, so I can > put a new mapping into the repository) > > 2.) add the mapping-xml from the attachement to the repository_junit.xml > file. The mapping is basically a copy of the mapping for the > Article-class, the major difference being the addition of proxy="true" for the reference-descriptor > for productGroup > > 3.) add the method testReferenceProxies() from the attachement to the > ProxyExample class in the test/ojb/broker/ directory > > > Cheers > > Georg > |