fixed broken persistence settings
This commit is contained in:
@ -26,10 +26,8 @@ public class PersistenceContextFactory {
|
|||||||
// account UI is the only application where application and account is the same database
|
// account UI is the only application where application and account is the same database
|
||||||
// account UI does not call this as it references all database access via accountPu
|
// account UI does not call this as it references all database access via accountPu
|
||||||
@PersistenceUnit (unitName = "accountPu")
|
@PersistenceUnit (unitName = "accountPu")
|
||||||
EntityManagerFactory applicationEntityManagerFactory;
|
EntityManagerFactory entityManagerFactory;
|
||||||
|
|
||||||
@PersistenceUnit (unitName = "accountPu")
|
|
||||||
EntityManagerFactory accountEntityManagerFactory;
|
|
||||||
|
|
||||||
@Produces
|
@Produces
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
@ -38,7 +36,7 @@ public class PersistenceContextFactory {
|
|||||||
if (LOGGER.isTraceEnabled()) {
|
if (LOGGER.isTraceEnabled()) {
|
||||||
LOGGER.trace("getting entityManager for application");
|
LOGGER.trace("getting entityManager for application");
|
||||||
}
|
}
|
||||||
EntityManager em = applicationEntityManagerFactory.createEntityManager(SynchronizationType.UNSYNCHRONIZED);
|
EntityManager em = entityManagerFactory.createEntityManager(SynchronizationType.UNSYNCHRONIZED);
|
||||||
return em;
|
return em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +55,7 @@ public class PersistenceContextFactory {
|
|||||||
if (LOGGER.isTraceEnabled()) {
|
if (LOGGER.isTraceEnabled()) {
|
||||||
LOGGER.trace("getting entityManager for account database");
|
LOGGER.trace("getting entityManager for account database");
|
||||||
}
|
}
|
||||||
EntityManager em = accountEntityManagerFactory.createEntityManager(SynchronizationType.UNSYNCHRONIZED);
|
EntityManager em = entityManagerFactory.createEntityManager(SynchronizationType.UNSYNCHRONIZED);
|
||||||
return em;
|
return em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
||||||
<persistence-unit name="accountPu" transaction-type="RESOURCE_LOCAL">
|
<persistence-unit name="accountPu" transaction-type="JTA">
|
||||||
<exclude-unlisted-classes>false</exclude-unlisted-classes>
|
<provider>org.hibernate.ejb.HibernatePersistence</provider>
|
||||||
|
<jta-data-source>java:/jboss/accountDs</jta-data-source>
|
||||||
|
<class>de.muehlencord.shared.account.business.account.entity.AccountEntity</class>
|
||||||
|
<class>de.muehlencord.shared.account.business.account.entity.AccountHistoryEntity</class>
|
||||||
|
<class>de.muehlencord.shared.account.business.account.entity.AccountLoginEntity</class>
|
||||||
|
<class>de.muehlencord.shared.account.business.account.entity.ApiKeyEntity</class>
|
||||||
|
<class>de.muehlencord.shared.account.business.application.entity.ApplicationEntity</class>
|
||||||
|
<class>de.muehlencord.shared.account.business.application.entity.ApplicationPermissionEntity</class>
|
||||||
|
<class>de.muehlencord.shared.account.business.application.entity.ApplicationRoleEntity</class>
|
||||||
|
<class>de.muehlencord.shared.account.business.config.entity.ConfigEntity</class>
|
||||||
|
<class>de.muehlencord.shared.account.business.mail.entity.MailTemplateEntity</class>
|
||||||
|
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||||
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
|
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
|
||||||
<validation-mode>NONE</validation-mode>
|
<validation-mode>NONE</validation-mode>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
||||||
<persistence-unit name="accountPu" transaction-type="RESOURCE_LOCAL">
|
<persistence-unit name="accountPu" transaction-type="JTA">
|
||||||
|
<jta-data-source>java:/jboss/accountDs</jta-data-source>
|
||||||
<exclude-unlisted-classes>false</exclude-unlisted-classes>
|
<exclude-unlisted-classes>false</exclude-unlisted-classes>
|
||||||
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
|
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
Reference in New Issue
Block a user