public static boolean isProxy(Object object) {
    	boolean isProxy = false;
    	//Class clazz = object.getClass();
        // check if it's a cglib proxy
        /*if (net.sf.cglib.proxy.Proxy.isProxyClass(clazz)) {
        	isProxy = true;
        } else if (net.sf.cglib.proxy.Enhancer.isEnhanced(clazz)) {
        	isProxy = true;
        } else if (org.hibernate.proxy.HibernateProxy.class.isInstance(object)) {
        	isProxy = true;
        } else if (object instanceof org.hibernate.proxy.HibernateProxy) {
        	isProxy = true;
        }*/
        try {
			if (Class.forName("org.hibernate.proxy.HibernateProxy").isInstance(object)) {
				isProxy = true;
			}
		} catch (ClassNotFoundException e) {
			//Do nothing
		}
    	
        return isProxy;
    }