Package org.jboss.as.jpa.config
Class Configuration
- java.lang.Object
-
- org.jboss.as.jpa.config.Configuration
-
public class Configuration extends Object
configuration properties that may appear in persistence.xml- Author:
- Scott Marlow
-
-
Field Summary
Fields Modifier and Type Field Description static StringADAPTER_CLASSname of the persistence provider adapter classstatic StringADAPTER_MODULEname of the AS module that contains the persistence provider adapterstatic StringADAPTER_MODULE_OPENJPAstatic StringALLOWJOINEDUNSYNCPCstatic StringHIBERNATE_SEARCH_BACKEND_TYPEname of the Hibernate Search configuration property allowing to set the backend typestatic StringHIBERNATE_SEARCH_BACKEND_TYPE_VALUE_ELASTICSEARCHThe value of theHIBERNATE_SEARCH_BACKEND_TYPEproperty that identifies the use of an Elasticsearch backend.static StringHIBERNATE_SEARCH_BACKEND_TYPE_VALUE_LUCENEThe value of theHIBERNATE_SEARCH_BACKEND_TYPEproperty that identifies the use of a Lucene backend.static StringHIBERNATE_SEARCH_COORDINATION_STRATEGYName of the Hibernate Search configuration property allowing to set the coordination strategystatic StringHIBERNATE_SEARCH_COORDINATION_STRATEGY_VALUE_OUTBOX_POLLINGThe value of theHIBERNATE_SEARCH_COORDINATION_STRATEGYproperty that identifies the use of an Elasticsearch backend.static StringHIBERNATE_SEARCH_INTEGRATOR_ADAPTOR_MODULE_NAMEname of the Hibernate Search integrator adaptor modulestatic StringHIBERNATE_SEARCH_MODULEname of the Hibernate Search module name configuration setting in persistence unit definitionstatic StringHIBERNATE_SEARCH_MODULE_BACKEND_ELASTICSEARCHname of the Hibernate Search module providing the Elasticsearch backendstatic StringHIBERNATE_SEARCH_MODULE_BACKEND_LUCENEname of the Hibernate Search module providing the Lucene backendstatic StringHIBERNATE_SEARCH_MODULE_MAPPER_ORMname of the Hibernate Search module providing the ORM mapperstatic StringHIBERNATE_SEARCH_MODULE_MAPPER_ORM_COORDINATION_OUTBOXPOLLINGname of the Hibernate Search module providing the outbox-polling coordination strategystatic StringJPA_ALLOW_TWO_PHASE_BOOTSTRAPset to false to force a single phase persistence unit bootstrap to be used (default is true which uses two phases to start the persistence unit).static StringJPA_CONTAINER_CLASS_TRANSFORMERdefaults to true, if false, persistence unit will not support jakarta.persistence.spi.ClassTransformer Interface which means no application class rewritingstatic StringJPA_CONTAINER_MANAGEDdefaults to true, if changed to false (in the persistence.xml), the Jakarta Persistence container will not start the persistence unit service.static StringJPA_DEFAULT_PERSISTENCE_UNITstatic StringPROVIDER_CLASS_DATANUCLEUSDataNucleus providerstatic StringPROVIDER_CLASS_DATANUCLEUS_GAEDataNucleus provider GAEstatic StringPROVIDER_CLASS_DEFAULTdefault provider classstatic StringPROVIDER_CLASS_ECLIPSELINKEclipseLink provider class namestatic StringPROVIDER_CLASS_HIBERNATEHibernate 4.3.x persistence provider classstatic StringPROVIDER_CLASS_HIBERNATE_OGMHibernate OGM persistence provider classstatic StringPROVIDER_CLASS_HIBERNATE4_1Hibernate 4.1.x persistence provider classstatic StringPROVIDER_CLASS_OPENJPAstatic StringPROVIDER_CLASS_TOPLINKstatic StringPROVIDER_CLASS_TOPLINK_ESSENTIALSTopLink provider class namesstatic StringPROVIDER_MODULEname of the AS module that contains the persistence providerstatic StringPROVIDER_MODULE_APPLICATION_SUPPLIEDif the PROVIDER_MODULE is this value, it is expected that the application has its own provider in the deployment.static StringPROVIDER_MODULE_DATANUCLEUSstatic StringPROVIDER_MODULE_DATANUCLEUS_GAEstatic StringPROVIDER_MODULE_DEFAULTdefault if no PROVIDER_MODULE is specified.static StringPROVIDER_MODULE_ECLIPSELINKstatic StringPROVIDER_MODULE_HIBERNATEHibernate main module (default) persistence providerstatic StringPROVIDER_MODULE_HIBERNATE_OGMHibernate OGM persistence providerstatic StringPROVIDER_MODULE_HIBERNATE4_1Hibernate 4.1.x persistence provider, note that Hibernate 4.1.x is expected to be in the 4.1 slotstatic StringPROVIDER_MODULE_OPENJPAstatic StringPROVIDER_MODULE_TOPLINKstatic StringSKIPMIXEDSYNCTYPECHECKING
-
Constructor Summary
Constructors Constructor Description Configuration()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanallowApplicationDefinedDatasource(PersistenceUnitMetadata pu)Determine if persistence unit can use application defined DataSource (e.g.static booleanallowDefaultDataSourceUse(PersistenceUnitMetadata pu)Determine if the default data-source should be usedstatic booleanallowJoinedUnsyncPersistenceContext(jakarta.persistence.EntityManagerFactory emf, Map targetEntityManagerProperties)Allow an unsynchronized persistence context that is joined to the transaction, be treated the same as a synchronized persistence context, with respect to the checking for mixed unsync/sync types.static booleanallowTwoPhaseBootstrap(PersistenceUnitMetadata pu)Determine if two phase persistence unit start is allowedstatic booleandeferEntityDetachUntilClose(Map<String,Object> properties)Return true if detaching of managed entities should be deferred until the entity manager is closed.static StringgetDefaultProviderModuleName()static StringgetProviderAdapterModuleNameFromProviderClassName(String providerClassName)static StringgetProviderModuleNameFromProviderClassName(String providerClassName)Get the provider module name for the specified provider class.static StringgetScopedPersistenceUnitName(PersistenceUnitMetadata pu)static booleanneedClassFileTransformer(PersistenceUnitMetadata pu)Determine if class file transformer is needed for the specified persistence unit for all persistence providers, the transformer is assumed to be needed unless the application indicates otherwise.static booleanskipMixedSynchronizationTypeCheck(jakarta.persistence.EntityManagerFactory emf, Map targetEntityManagerProperties)Allow the mixed synchronization checking to be skipped for backward compatibility with WildFly 10.1.0static booleanskipQueryDetach(Map<String,Object> properties)Return true if detaching of query results (entities) should be deferred until the entity manager is closed.
-
-
-
Field Detail
-
PROVIDER_MODULE
public static final String PROVIDER_MODULE
name of the AS module that contains the persistence provider- See Also:
- Constant Field Values
-
PROVIDER_MODULE_HIBERNATE
public static final String PROVIDER_MODULE_HIBERNATE
Hibernate main module (default) persistence provider- See Also:
- Constant Field Values
-
PROVIDER_MODULE_HIBERNATE4_1
public static final String PROVIDER_MODULE_HIBERNATE4_1
Hibernate 4.1.x persistence provider, note that Hibernate 4.1.x is expected to be in the 4.1 slot- See Also:
- Constant Field Values
-
PROVIDER_MODULE_HIBERNATE_OGM
public static final String PROVIDER_MODULE_HIBERNATE_OGM
Hibernate OGM persistence provider- See Also:
- Constant Field Values
-
PROVIDER_MODULE_ECLIPSELINK
public static final String PROVIDER_MODULE_ECLIPSELINK
- See Also:
- Constant Field Values
-
PROVIDER_MODULE_TOPLINK
public static final String PROVIDER_MODULE_TOPLINK
- See Also:
- Constant Field Values
-
PROVIDER_MODULE_DATANUCLEUS
public static final String PROVIDER_MODULE_DATANUCLEUS
- See Also:
- Constant Field Values
-
PROVIDER_MODULE_DATANUCLEUS_GAE
public static final String PROVIDER_MODULE_DATANUCLEUS_GAE
- See Also:
- Constant Field Values
-
PROVIDER_MODULE_OPENJPA
public static final String PROVIDER_MODULE_OPENJPA
- See Also:
- Constant Field Values
-
PROVIDER_MODULE_DEFAULT
public static final String PROVIDER_MODULE_DEFAULT
default if no PROVIDER_MODULE is specified.- See Also:
- Constant Field Values
-
PROVIDER_CLASS_HIBERNATE4_1
public static final String PROVIDER_CLASS_HIBERNATE4_1
Hibernate 4.1.x persistence provider class- See Also:
- Constant Field Values
-
PROVIDER_CLASS_HIBERNATE
public static final String PROVIDER_CLASS_HIBERNATE
Hibernate 4.3.x persistence provider class- See Also:
- Constant Field Values
-
PROVIDER_CLASS_HIBERNATE_OGM
public static final String PROVIDER_CLASS_HIBERNATE_OGM
Hibernate OGM persistence provider class- See Also:
- Constant Field Values
-
PROVIDER_CLASS_TOPLINK_ESSENTIALS
public static final String PROVIDER_CLASS_TOPLINK_ESSENTIALS
TopLink provider class names- See Also:
- Constant Field Values
-
PROVIDER_CLASS_TOPLINK
public static final String PROVIDER_CLASS_TOPLINK
- See Also:
- Constant Field Values
-
PROVIDER_CLASS_ECLIPSELINK
public static final String PROVIDER_CLASS_ECLIPSELINK
EclipseLink provider class name- See Also:
- Constant Field Values
-
PROVIDER_CLASS_DATANUCLEUS
public static final String PROVIDER_CLASS_DATANUCLEUS
DataNucleus provider- See Also:
- Constant Field Values
-
PROVIDER_CLASS_DATANUCLEUS_GAE
public static final String PROVIDER_CLASS_DATANUCLEUS_GAE
DataNucleus provider GAE- See Also:
- Constant Field Values
-
PROVIDER_CLASS_OPENJPA
public static final String PROVIDER_CLASS_OPENJPA
- See Also:
- Constant Field Values
-
PROVIDER_CLASS_DEFAULT
public static final String PROVIDER_CLASS_DEFAULT
default provider class- See Also:
- Constant Field Values
-
PROVIDER_MODULE_APPLICATION_SUPPLIED
public static final String PROVIDER_MODULE_APPLICATION_SUPPLIED
if the PROVIDER_MODULE is this value, it is expected that the application has its own provider in the deployment.- See Also:
- Constant Field Values
-
ADAPTER_MODULE_OPENJPA
public static final String ADAPTER_MODULE_OPENJPA
- See Also:
- Constant Field Values
-
ADAPTER_MODULE
public static final String ADAPTER_MODULE
name of the AS module that contains the persistence provider adapter- See Also:
- Constant Field Values
-
JPA_CONTAINER_MANAGED
public static final String JPA_CONTAINER_MANAGED
defaults to true, if changed to false (in the persistence.xml), the Jakarta Persistence container will not start the persistence unit service.- See Also:
- Constant Field Values
-
JPA_DEFAULT_PERSISTENCE_UNIT
public static final String JPA_DEFAULT_PERSISTENCE_UNIT
- See Also:
- Constant Field Values
-
JPA_CONTAINER_CLASS_TRANSFORMER
public static final String JPA_CONTAINER_CLASS_TRANSFORMER
defaults to true, if false, persistence unit will not support jakarta.persistence.spi.ClassTransformer Interface which means no application class rewriting- See Also:
- Constant Field Values
-
JPA_ALLOW_TWO_PHASE_BOOTSTRAP
public static final String JPA_ALLOW_TWO_PHASE_BOOTSTRAP
set to false to force a single phase persistence unit bootstrap to be used (default is true which uses two phases to start the persistence unit).- See Also:
- Constant Field Values
-
ADAPTER_CLASS
public static final String ADAPTER_CLASS
name of the persistence provider adapter class- See Also:
- Constant Field Values
-
ALLOWJOINEDUNSYNCPC
public static final String ALLOWJOINEDUNSYNCPC
- See Also:
- Constant Field Values
-
SKIPMIXEDSYNCTYPECHECKING
public static final String SKIPMIXEDSYNCTYPECHECKING
- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_MODULE
public static final String HIBERNATE_SEARCH_MODULE
name of the Hibernate Search module name configuration setting in persistence unit definition- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_INTEGRATOR_ADAPTOR_MODULE_NAME
public static final String HIBERNATE_SEARCH_INTEGRATOR_ADAPTOR_MODULE_NAME
name of the Hibernate Search integrator adaptor module- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_MODULE_MAPPER_ORM
public static final String HIBERNATE_SEARCH_MODULE_MAPPER_ORM
name of the Hibernate Search module providing the ORM mapper- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_MODULE_MAPPER_ORM_COORDINATION_OUTBOXPOLLING
public static final String HIBERNATE_SEARCH_MODULE_MAPPER_ORM_COORDINATION_OUTBOXPOLLING
name of the Hibernate Search module providing the outbox-polling coordination strategy- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_MODULE_BACKEND_LUCENE
public static final String HIBERNATE_SEARCH_MODULE_BACKEND_LUCENE
name of the Hibernate Search module providing the Lucene backend- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_MODULE_BACKEND_ELASTICSEARCH
public static final String HIBERNATE_SEARCH_MODULE_BACKEND_ELASTICSEARCH
name of the Hibernate Search module providing the Elasticsearch backend- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_BACKEND_TYPE
public static final String HIBERNATE_SEARCH_BACKEND_TYPE
name of the Hibernate Search configuration property allowing to set the backend type- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_BACKEND_TYPE_VALUE_LUCENE
public static final String HIBERNATE_SEARCH_BACKEND_TYPE_VALUE_LUCENE
The value of theHIBERNATE_SEARCH_BACKEND_TYPEproperty that identifies the use of a Lucene backend.- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_BACKEND_TYPE_VALUE_ELASTICSEARCH
public static final String HIBERNATE_SEARCH_BACKEND_TYPE_VALUE_ELASTICSEARCH
The value of theHIBERNATE_SEARCH_BACKEND_TYPEproperty that identifies the use of an Elasticsearch backend.- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_COORDINATION_STRATEGY
public static final String HIBERNATE_SEARCH_COORDINATION_STRATEGY
Name of the Hibernate Search configuration property allowing to set the coordination strategy- See Also:
- Constant Field Values
-
HIBERNATE_SEARCH_COORDINATION_STRATEGY_VALUE_OUTBOX_POLLING
public static final String HIBERNATE_SEARCH_COORDINATION_STRATEGY_VALUE_OUTBOX_POLLING
The value of theHIBERNATE_SEARCH_COORDINATION_STRATEGYproperty that identifies the use of an Elasticsearch backend.- See Also:
- Constant Field Values
-
-
Method Detail
-
getProviderModuleNameFromProviderClassName
public static String getProviderModuleNameFromProviderClassName(String providerClassName)
Get the provider module name for the specified provider class.- Parameters:
providerClassName- the PU class name- Returns:
- provider module name or null if not known
-
needClassFileTransformer
public static boolean needClassFileTransformer(PersistenceUnitMetadata pu)
Determine if class file transformer is needed for the specified persistence unit for all persistence providers, the transformer is assumed to be needed unless the application indicates otherwise.- Parameters:
pu- the PU- Returns:
- true if class file transformer support is needed for pu
-
getProviderAdapterModuleNameFromProviderClassName
public static String getProviderAdapterModuleNameFromProviderClassName(String providerClassName)
-
getDefaultProviderModuleName
public static String getDefaultProviderModuleName()
-
allowTwoPhaseBootstrap
public static boolean allowTwoPhaseBootstrap(PersistenceUnitMetadata pu)
Determine if two phase persistence unit start is allowed- Parameters:
pu-- Returns:
-
allowApplicationDefinedDatasource
public static boolean allowApplicationDefinedDatasource(PersistenceUnitMetadata pu)
Determine if persistence unit can use application defined DataSource (e.g. DataSourceDefinition or resource ref).- Parameters:
pu-- Returns:
- true if application defined DataSource can be used, false (default) if not.
-
allowDefaultDataSourceUse
public static boolean allowDefaultDataSourceUse(PersistenceUnitMetadata pu)
Determine if the default data-source should be used- Parameters:
pu-- Returns:
- true if the default data-source should be used
-
deferEntityDetachUntilClose
public static boolean deferEntityDetachUntilClose(Map<String,Object> properties)
Return true if detaching of managed entities should be deferred until the entity manager is closed. Note: only applies to transaction scoped entity managers used without an active Jakarta Transactions transaction.- Parameters:
properties-- Returns:
-
skipQueryDetach
public static boolean skipQueryDetach(Map<String,Object> properties)
Return true if detaching of query results (entities) should be deferred until the entity manager is closed. Note: only applies to transaction scoped entity managers used without an active Jakarta Transactions transaction.- Parameters:
properties-- Returns:
-
getScopedPersistenceUnitName
public static String getScopedPersistenceUnitName(PersistenceUnitMetadata pu)
-
skipMixedSynchronizationTypeCheck
public static boolean skipMixedSynchronizationTypeCheck(jakarta.persistence.EntityManagerFactory emf, Map targetEntityManagerProperties)Allow the mixed synchronization checking to be skipped for backward compatibility with WildFly 10.1.0- Parameters:
emf-targetEntityManagerProperties-- Returns:
-
allowJoinedUnsyncPersistenceContext
public static boolean allowJoinedUnsyncPersistenceContext(jakarta.persistence.EntityManagerFactory emf, Map targetEntityManagerProperties)Allow an unsynchronized persistence context that is joined to the transaction, be treated the same as a synchronized persistence context, with respect to the checking for mixed unsync/sync types.- Parameters:
emf-targetEntityManagerProperties-- Returns:
-
-