private static boolean isProxyRequired(ManagedClassSPI hostManagedClass, ManagedClassSPI dependencyManagedClass) {
    """
	Compare host and dependency managed classes scope and decide if scope proxy is required. Current implementation enable
	scope proxy only when dependency has {@link InstanceScope#SESSION} scope.
	
	@param hostManagedClass managed class defining the context on which dependency is resolved,
	@param dependencyManagedClass dependency managed class, possible null.
	@return true if scope proxy is required.
    """
		if (dependencyManagedClass != null) {
			InstanceScope dependencyScope = dependencyManagedClass.getInstanceScope();
			if (InstanceScope.THREAD.equals(dependencyScope)) {
				return InstanceScope.APPLICATION.equals(hostManagedClass.getInstanceScope());
			}
			return InstanceScope.SESSION.equals(dependencyScope);
		}
		return false;
	}
private static boolean isProxyRequired(ManagedClassSPI hostManagedClass, ManagedClassSPI dependencyManagedClass) {
		if (dependencyManagedClass != null) {
			InstanceScope dependencyScope = dependencyManagedClass.getInstanceScope();
			if (InstanceScope.THREAD.equals(dependencyScope)) {
				return InstanceScope.APPLICATION.equals(hostManagedClass.getInstanceScope());
			}
			return InstanceScope.SESSION.equals(dependencyScope);
		}
		return false;
	}
private static boolean isProxyRequired ( ManagedClassSPI hostManagedClass , ManagedClassSPI dependencyManagedClass ) { if ( dependencyManagedClass != null ) { InstanceScope dependencyScope = dependencyManagedClass . getInstanceScope ( ) ; if ( InstanceScope . THREAD . equals ( dependencyScope ) ) { return InstanceScope . APPLICATION . equals ( hostManagedClass . getInstanceScope ( ) ) ; } return InstanceScope . SESSION . equals ( dependencyScope ) ; } return false ; }
Compare host and dependency managed classes scope and decide if scope proxy is required. Current implementation enable
scope proxy only when dependency has {@link InstanceScope#SESSION} scope.

@param hostManagedClass managed class defining the context on which dependency is resolved,
@param dependencyManagedClass dependency managed class, possible null.
@return true if scope proxy is required.
Compare host and dependency managed classes scope and decide if scope proxy is required . Current implementation enable scope proxy only when dependency has { @link InstanceScope#SESSION } scope .