try
{
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (Application.exists())
{
IClassResolver classResolver = Application.get()
.getApplicationSettings()
.getClassResolver();
if (classResolver != null)
{
classLoader = classResolver.getClassLoader();
}
}
return Proxy.newProxyInstance(classLoader,
new Class[] { type, Serializable.class, ILazyInitProxy.class,