Examples of shouldIsolateObjectsInUnitOfWork()


Examples of org.eclipse.persistence.descriptors.ClassDescriptor.shouldIsolateObjectsInUnitOfWork()

                            if (descriptor == null) {
                                descriptor = session.getDescriptor(objectChangeSet.getClassType(session));
                            }
                        }
                        // PERF: Do not merge nor lock into the session cache if descriptor set to unit of work isolated.
                        if (descriptor.shouldIsolateObjectsInUnitOfWork()) {
                            break;
                        }
                        CacheKey activeCacheKey = attemptToAcquireLock(descriptor, objectChangeSet.getCacheKey(), session);
                        if (activeCacheKey == null) {
                            // if cacheKey is null then the lock was not available no need to synchronize this block,because if the
View Full Code Here

Examples of org.eclipse.persistence.descriptors.ClassDescriptor.shouldIsolateObjectsInUnitOfWork()

            if (wasAClone && (!isARefresh)) {
                return workingClone;
            }
   
            boolean wasAnOriginal = false;
            boolean isIsolated = descriptor.shouldIsolateObjectsInUnitOfWork() || (descriptor.shouldIsolateObjectsInUnitOfWorkEarlyTransaction() && unitOfWork.wasTransactionBegunPrematurely());
            Object original = null;   
            // If not refreshing can get the object from the cache.
            if ((!isARefresh) && (!isIsolated) && !unitOfWork.shouldReadFromDB()) {
                CacheKey originalCacheKey = session.getIdentityMapAccessorInstance().getCacheKeyForObject(primaryKey, descriptor.getJavaClass(), descriptor);
                if (originalCacheKey != null) {
View Full Code Here

Examples of org.eclipse.persistence.descriptors.ClassDescriptor.shouldIsolateObjectsInUnitOfWork()

                    if (descriptor == null) {
                        descriptor = session.getDescriptor(objectChangeSet.getClassType(session));
                        objectChangeSet.setDescriptor(descriptor);
                    }
                    // PERF: Do not merge nor lock into the session cache if descriptor set to unit of work isolated.
                    if (descriptor.shouldIsolateObjectsInUnitOfWork()) {
                        continue;
                    }
                    AbstractSession targetSession = session.getParentIdentityMapSession(descriptor, true, true);
                    CacheKey activeCacheKey = attemptToAcquireLock(descriptor, objectChangeSet.getId(), targetSession);
                    if (activeCacheKey == null) {
View Full Code Here

Examples of org.eclipse.persistence.descriptors.ClassDescriptor.shouldIsolateObjectsInUnitOfWork()

            }
        }
        // If only checking the cache, and empty, return invalid, unless it is a unit of work,
        // in which case the parent cache still needs to be checked.
        if ((cachedObject == null) && query.shouldCheckCacheOnly()
                && ((uow == null) ||  (!uow.isNestedUnitOfWork() && descriptor.shouldIsolateObjectsInUnitOfWork()))) {
            return InvalidObject.instance;
        }

        return cachedObject;
    }
View Full Code Here

Examples of org.eclipse.persistence.descriptors.ClassDescriptor.shouldIsolateObjectsInUnitOfWork()

            if (wasAClone && (!isARefresh)) {
                return workingClone;
            }
   
            boolean wasAnOriginal = false;
            boolean isIsolated = descriptor.shouldIsolateObjectsInUnitOfWork() || (descriptor.shouldIsolateObjectsInUnitOfWorkEarlyTransaction() && unitOfWork.wasTransactionBegunPrematurely());

            Object original = null;   
            CacheKey originalCacheKey = null;
            // If not refreshing can get the object from the cache.
            if ((!isARefresh) && (!isIsolated) && !query.shouldRetrieveBypassCache() && !unitOfWork.shouldReadFromDB() && (!unitOfWork.shouldForceReadFromDB(query, primaryKey))) {
View Full Code Here

Examples of org.eclipse.persistence.descriptors.ClassDescriptor.shouldIsolateObjectsInUnitOfWork()

            return false;
        }
        Iterator<ClassDescriptor> i = orderedDescriptors.iterator();
        while (i.hasNext()){
            ClassDescriptor descriptor = i.next();
            if (descriptor.isIsolated() && !descriptor.shouldIsolateObjectsInUnitOfWork()){
                return true;
            }
        }
        return false;
    }
View Full Code Here

Examples of org.eclipse.persistence.descriptors.ClassDescriptor.shouldIsolateObjectsInUnitOfWork()

            if (wasAClone && (!isARefresh)) {
                return workingClone;
            }
   
            boolean wasAnOriginal = false;
            boolean isIsolated = descriptor.shouldIsolateObjectsInUnitOfWork() || (descriptor.shouldIsolateObjectsInUnitOfWorkEarlyTransaction() && unitOfWork.wasTransactionBegunPrematurely());
            Object original = null;   
            // If not refreshing can get the object from the cache.
            if ((!isARefresh) && (!isIsolated) && !unitOfWork.shouldReadFromDB()) {
                CacheKey originalCacheKey = session.getIdentityMapAccessorInstance().getCacheKeyForObject(primaryKey, descriptor.getJavaClass(), descriptor);
                if (originalCacheKey != null) {
View Full Code Here

Examples of org.eclipse.persistence.descriptors.ClassDescriptor.shouldIsolateObjectsInUnitOfWork()

            }
        }
        // If only checking the cache, and empty, return invalid, unless it is a unit of work,
        // in which case the parent cache still needs to be checked.
        if ((cachedObject == null) && query.shouldCheckCacheOnly()
                && ((uow == null) ||  (!uow.isNestedUnitOfWork() && descriptor.shouldIsolateObjectsInUnitOfWork()))) {
            return InvalidObject.instance;
        }

        return cachedObject;
    }
View Full Code Here

Examples of org.eclipse.persistence.descriptors.ClassDescriptor.shouldIsolateObjectsInUnitOfWork()

                            if (descriptor == null) {
                                descriptor = session.getDescriptor(objectChangeSet.getClassType(session));
                            }
                        }
                        // PERF: Do not merge nor lock into the session cache if descriptor set to unit of work isolated.
                        if (descriptor.shouldIsolateObjectsInUnitOfWork()) {
                            break;
                        }
                        CacheKey activeCacheKey = attemptToAcquireLock(descriptor, objectChangeSet.getCacheKey(), session);
                        if (activeCacheKey == null) {
                            // if cacheKey is null then the lock was not available no need to synchronize this block,because if the
View Full Code Here

Examples of org.eclipse.persistence.descriptors.ClassDescriptor.shouldIsolateObjectsInUnitOfWork()

            if (wasAClone && (!isARefresh)) {
                return workingClone;
            }
   
            boolean wasAnOriginal = false;
            boolean isIsolated = descriptor.shouldIsolateObjectsInUnitOfWork() || (descriptor.shouldIsolateObjectsInUnitOfWorkEarlyTransaction() && unitOfWork.wasTransactionBegunPrematurely());

            Object original = null;   
            CacheKey originalCacheKey = null;
            // If not refreshing can get the object from the cache.
            if ((!isARefresh) && (!isIsolated) && !query.shouldRetrieveBypassCache() && !unitOfWork.shouldReadFromDB() && (!unitOfWork.shouldForceReadFromDB(query, primaryKey))) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.