Examples of shouldIsolateObjectsInUnitOfWork()


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()) {
                AbstractSession session = unitOfWork.getParentIdentityMapSession(query);           
                CacheKey originalCacheKey = session.getIdentityMapAccessorInstance().getCacheKeyForObject(primaryKey, descriptor.getJavaClass(), descriptor);
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.getId(), 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()

                        }
                        // It would be so much nicer if the change set was keyed by the class instead of class name,
                        // so this could be done once.  We should key on class, and only convert to keying on name when broadcasting changes.
                        ClassDescriptor descriptor = session.getDescriptor(objectClass);
                        // 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(objectClass, objectChangeSet.getCacheKey(), session);
                        if (activeCacheKey == null) {
                            //if cacheKey is null then the lock was not available
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
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.