Attempt to at working around CGLIB bug.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4517 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park 2006-12-05 03:37:39 +00:00
parent c33dcb6412
commit e8b37eb880
2 changed files with 9 additions and 2 deletions

View File

@ -47,6 +47,7 @@ import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.namespace.QName; import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair; import org.alfresco.util.Pair;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.hibernate.proxy.HibernateProxy;
/** /**
* This or AVMStore are * This or AVMStore are
@ -1106,7 +1107,13 @@ public class AVMRepository
*/ */
private AVMStore getAVMStoreByName(String name) private AVMStore getAVMStoreByName(String name)
{ {
return AVMDAOs.Instance().fAVMStoreDAO.getByName(name); AVMStore store = AVMDAOs.Instance().fAVMStoreDAO.getByName(name);
if (store instanceof HibernateProxy)
{
store =
(AVMStore)((HibernateProxy)store).getHibernateLazyInitializer().getImplementation();
}
return store;
} }
/** /**

View File

@ -102,7 +102,7 @@
</class> </class>
<!-- A store is the what we used to call a virtual repository. --> <!-- A store is the what we used to call a virtual repository. -->
<class table="avm_stores" name="AVMStoreImpl" <class table="avm_stores" name="AVMStoreImpl"
proxy="AVMStore" optimistic-lock="version" lazy="false"> proxy="AVMStore" optimistic-lock="version">
<cache usage="read-write"/> <cache usage="read-write"/>
<id name="id" column="id" type="long"> <id name="id" column="id" type="long">
<generator class="native"/> <generator class="native"/>