|
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 |