This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
View | Details | Raw Unified | Return to bug 322585 | Differences between
and this patch

Collapse All | Expand All

(-)foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/ClassDescriptor.java (-3 / +3 lines)
Lines 133-143 Link Here
133
    
133
    
134
    protected transient int initializationStage;
134
    protected transient int initializationStage;
135
    protected transient int interfaceInitializationStage;
135
    protected transient int interfaceInitializationStage;
136
    /** The following are the states the descriptor passes thru during the initialization. */
136
    /** The following are the [initializationStage] states the descriptor passes through during the initialization. */
137
    protected static final int UNINITIALIZED = 0;
137
    protected static final int UNINITIALIZED = 0;
138
    protected static final int PREINITIALIZED = 1;
138
    protected static final int PREINITIALIZED = 1;
139
    protected static final int INITIALIZED = 2;
139
    protected static final int INITIALIZED = 2; // this state represents a fully initialized descriptor
140
    protected static final int POST_INITIALIZED = 3;
140
    protected static final int POST_INITIALIZED = 3; // however this value is used by the public function isFullyInitialized()
141
    protected static final int ERROR = -1;
141
    protected static final int ERROR = -1;
142
    
142
    
143
    protected int descriptorType;
143
    protected int descriptorType;
(-)jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java (-2 / +23 lines)
Lines 26-31 Link Here
26
 *     cdelahun - Bug 214534: changes to allow JMSPublishingTransportManager configuration through properties
26
 *     cdelahun - Bug 214534: changes to allow JMSPublishingTransportManager configuration through properties
27
 *     05/14/2010-2.1 Guy Pelletier 
27
 *     05/14/2010-2.1 Guy Pelletier 
28
 *       - 253083: Add support for dynamic persistence using ORM.xml/eclipselink-orm.xml
28
 *       - 253083: Add support for dynamic persistence using ORM.xml/eclipselink-orm.xml
29
 *     08/17/2010-2.2 Michael O'Brien 
30
 *        - 322585: Add check to login/deploy on EMF creation instead of on the 1st create EM
29
 ******************************************************************************/  
31
 ******************************************************************************/  
30
package org.eclipse.persistence.internal.jpa;
32
package org.eclipse.persistence.internal.jpa;
31
33
Lines 1027-1032 Link Here
1027
        return isValidationOnly(m, true);
1029
        return isValidationOnly(m, true);
1028
    }
1030
    }
1029
    
1031
    
1032
    /**
1033
     * INTERNAL:
1034
     * @since EclipseLink 2.2
1035
     * @param m
1036
     * @param shouldMergeMap
1037
     * @return
1038
     */
1039
    protected boolean isLoginEnabledAtEMFCreate(Map m, boolean shouldMergeMap) {
1040
        if (shouldMergeMap) {
1041
            m = mergeWithExistingMap(m);
1042
        }
1043
        String loginAtEMFString = getConfigPropertyAsStringLogDebug(PersistenceUnitProperties.LOGIN_AT_EMF_PROPERTY, m, session);
1044
        if (loginAtEMFString != null) {
1045
            return Boolean.parseBoolean(loginAtEMFString);
1046
        } else {
1047
            // default to true - also do a partial deploy at emf predeploy
1048
            return true;
1049
        }
1050
    }
1051
    
1030
    protected boolean isValidationOnly(Map m, boolean shouldMergeMap) {
1052
    protected boolean isValidationOnly(Map m, boolean shouldMergeMap) {
1031
        if (shouldMergeMap) {
1053
        if (shouldMergeMap) {
1032
            m = mergeWithExistingMap(m);
1054
            m = mergeWithExistingMap(m);
Lines 1041-1047 Link Here
1041
    
1063
    
1042
    public boolean shouldGetSessionOnCreateFactory(Map m) {
1064
    public boolean shouldGetSessionOnCreateFactory(Map m) {
1043
        m = mergeWithExistingMap(m);
1065
        m = mergeWithExistingMap(m);
1044
        return isValidationOnly(m, false);
1066
        return isValidationOnly(m, false) || isLoginEnabledAtEMFCreate(m, false);
1045
    }
1067
    }
1046
    
1068
    
1047
    protected Map mergeWithExistingMap(Map m) {
1069
    protected Map mergeWithExistingMap(Map m) {
Lines 1988-1994 Link Here
1988
        return validationMode;
2010
        return validationMode;
1989
    }
2011
    }
1990
2012
1991
    
1992
    /**
2013
    /**
1993
     * INTERNAL:
2014
     * INTERNAL:
1994
     * Return an instance of Metamodel interface for access to the
2015
     * Return an instance of Metamodel interface for access to the
(-)jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/jpa/PersistenceProvider.java (+3 lines)
Lines 12-17 Link Here
12
 *     tware - 1.0RC1 - OSGI refactor
12
 *     tware - 1.0RC1 - OSGI refactor
13
 *     12/23/2008-1.1M5 Michael O'Brien 
13
 *     12/23/2008-1.1M5 Michael O'Brien 
14
 *        - 253701: set persistenceInitializationHelper so EntityManagerSetupImpl.undeploy() can clear the JavaSECMPInitializer
14
 *        - 253701: set persistenceInitializationHelper so EntityManagerSetupImpl.undeploy() can clear the JavaSECMPInitializer
15
 *     08/17/2010-2.2 Michael O'Brien 
16
 *        - 322585: Add check to login/deploy on EMF creation instead of on the 1st create EM
15
 ******************************************************************************/  
17
 ******************************************************************************/  
16
package org.eclipse.persistence.jpa;
18
package org.eclipse.persistence.jpa;
17
19
Lines 163-168 Link Here
163
            factory = new EntityManagerFactoryImpl(emSetupImpl, nonNullProperties);
165
            factory = new EntityManagerFactoryImpl(emSetupImpl, nonNullProperties);
164
        
166
        
165
            // This code has been added to allow validation to occur without actually calling createEntityManager
167
            // This code has been added to allow validation to occur without actually calling createEntityManager
168
            // As of 322585 in 2.2 the getServerSession() call will login/deploy on EMF creation unless disabled
166
            if (emSetupImpl.shouldGetSessionOnCreateFactory(nonNullProperties)) {
169
            if (emSetupImpl.shouldGetSessionOnCreateFactory(nonNullProperties)) {
167
                factory.getServerSession();
170
                factory.getServerSession();
168
            }
171
            }

Return to bug 322585