Skip to content

Commit

Permalink
🐛 defining the persistence unit in the right place
Browse files Browse the repository at this point in the history
Signed-off-by: dseurotech <[email protected]>
  • Loading branch information
dseurotech committed Jul 23, 2024
1 parent 10afdac commit 0ee208a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 37 deletions.
17 changes: 17 additions & 0 deletions commons/src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,21 @@
<property name="eclipselink.logging.logger" value="org.eclipse.persistence.logging.slf4j.SLF4JLogger"/>
</properties>
</persistence-unit>
<persistence-unit name="kapua-service-config" transaction-type="RESOURCE_LOCAL">

<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

<class>org.eclipse.kapua.commons.configuration.ServiceConfigImpl</class>

<!-- Base classes and External classes -->
<class>org.eclipse.kapua.commons.model.id.KapuaEid</class>
<class>org.eclipse.kapua.commons.model.AbstractKapuaEntity</class>
<class>org.eclipse.kapua.commons.model.AbstractKapuaNamedEntity</class>
<class>org.eclipse.kapua.commons.model.AbstractKapuaUpdatableEntity</class>

<properties>
<property name="javax.persistence.lock.timeout" value="1000"/>
<property name="eclipselink.logging.logger" value="org.eclipse.persistence.logging.slf4j.SLF4JLogger"/>
</properties>
</persistence-unit>
</persistence>
36 changes: 0 additions & 36 deletions commons/src/main/resources/persistence.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ServiceConfigurationManager deviceConnectionServiceConfigurationManager(
XmlUtil xmlUtil) {
return new ServiceConfigurationManagerCachingWrapper(
new DeviceConnectionServiceConfigurationManager(
txManagerFactory.create("kapua-datastore"),
txManagerFactory.create("kapua-service-config"),
new CachingServiceConfigRepository(
new ServiceConfigImplJpaRepository(jpaRepoConfig),
entityCacheFactory.createCache("AbstractKapuaConfigurableServiceCacheId")
Expand Down

0 comments on commit 0ee208a

Please sign in to comment.