Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#L%
-->

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
<persistence-unit name="blPU" transaction-type="RESOURCE_LOCAL">
<mapping-file>config/bc/jpa/domain/Page.orm.xml</mapping-file>
<mapping-file>config/bc/jpa/domain/StructuredContent.orm.xml</mapping-file>
Expand Down Expand Up @@ -58,16 +58,14 @@
<properties>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.transaction.flush_before_completion" value="false"/>
<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jcache.JCacheRegionFactory"/>
<property name="hibernate.javax.cache.provider" value="org.ehcache.jsr107.EhcacheCachingProvider"/>
<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jcache.internal.JCacheRegionFactory"/>
<property name="hibernate.jakarta.cache.provider" value="org.ehcache.jsr107.EhcacheCachingProvider"/>
<!-- See org.broadleafcommerce.common.extensibility.jpa.JCachePersistenceUnitPostProcessor for more information on the jcache.xml location -->
<property name="hibernate.cache.use_second_level_cache" value="false"/>
<property name="hibernate.cache.use_query_cache" value="false"/>
<property name="hibernate.generate_statistics" value="false" />
<property name="hibernate.archive.autodetection" value="false" />
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.id.new_generator_mappings" value="true"/>
<property name="hibernate.id.optimizer.pooled.prefer_lo" value="true"/>
<property name="hibernate.jdbc.log.warnings" value="false"/>
</properties>
</persistence-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#L%
-->

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
<persistence-unit name="blPU" transaction-type="RESOURCE_LOCAL">
<mapping-file>config/bc/jpa/domain/Admin.orm.xml</mapping-file>
<class>org.broadleafcommerce.openadmin.server.security.domain.ForgotPasswordSecurityTokenImpl</class>
Expand All @@ -35,7 +35,7 @@
<properties>
<!-- Other properties inherited from persistence-common.xml -->
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.ejb.session_factory_observer" value="org.broadleafcommerce.openadmin.server.dao.SessionFactoryChangeListener"/>
<property name="hibernate.session_factory_observer" value="org.broadleafcommerce.openadmin.server.dao.SessionFactoryChangeListener"/>
</properties>
</persistence-unit>

Expand All @@ -48,8 +48,6 @@
<property name="hibernate.cache.use_query_cache" value="false"/>
<property name="hibernate.archive.autodetection" value="false" />
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.id.new_generator_mappings" value="true"/>
<property name="hibernate.id.optimizer.pooled.prefer_lo" value="true"/>
</properties>
</persistence-unit>

Expand Down
10 changes: 5 additions & 5 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core-jakarta</artifactId>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jcache</artifactId>
</dependency>
<dependency>
Expand All @@ -171,8 +171,8 @@
<artifactId>easymockclassextension</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers-jakarta</artifactId>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-envers</artifactId>
</dependency>
<dependency>
<groupId>jakarta.mail</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public class DefaultJCacheUriProvider implements JCacheUriProvider {

private static final Log LOG = LogFactory.getLog(DefaultJCacheUriProvider.class);

@Value("${hibernate.javax.cache.uri:#{null}}")
@Value("${hibernate.jakarta.cache.uri:#{null}}")
protected String configLocation;

@Value("${hibernate.javax.cache.uri.relative:true}")
@Value("${hibernate.jakarta.cache.uri.relative:true}")
protected boolean isLocationRelative;

@Override
Expand All @@ -51,11 +51,11 @@ public URI getJCacheUri() {
if (url != null) {
return url.toURI();
}
LOG.warn("The property hibernate.javax.cache.uri.relative was set to true however there was no resource found for " + configLocation + ". Falling back on creating a URI from the provided config location set by the property hibernate.javax.cache.uri");
LOG.warn("The property hibernate.jakarta.cache.uri.relative was set to true however there was no resource found for " + configLocation + ". Falling back on creating a URI from the provided config location set by the property hibernate.jakarta.cache.uri");
}
return new URI(configLocation);
} catch (URISyntaxException e) {
throw new IllegalArgumentException("Incorrect URI syntax set for property hibernate.javax.cache.uri", e);
throw new IllegalArgumentException("Incorrect URI syntax set for property hibernate.jakarta.cache.uri", e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* Persistence unit post processor for dynamically modifying the persistence unit.
* <p>
* jcache.disable.cache - default: false, disables hibernate L2 and query cache if true
* hibernate.javax.cache.provider - default: null, overrides the cache provider defined in the persistence.xml
* hibernate.jakarta.cache.provider - default: null, overrides the cache provider defined in the persistence.xml
* hibernate.cache.region.factory_class - default: null, overrides the cache region factory defined in the persistence.xml
* <p>
* uriProvider - A configurable provider class that returns the URI to be used for caching
Expand All @@ -46,7 +46,7 @@ public class JCachePersistenceUnitPostProcessor implements PersistenceUnitPostPr
@Value("${jcache.disable.cache:false}")
protected Boolean disableCache;

@Value("${hibernate.javax.cache.provider:#{null}}")
@Value("${hibernate.jakarta.cache.provider:#{null}}")
protected String cacheProvider;

@Value("${hibernate.cache.region.factory_class:#{null}}")
Expand All @@ -68,14 +68,14 @@ public void postProcessPersistenceUnitInfo(MutablePersistenceUnitInfo pui) {
}

URI cacheUri = uriProvider.getJCacheUri();
properties.setProperty("hibernate.javax.cache.uri", cacheUri != null ? uriProvider.getJCacheUri().toString() : "");
properties.setProperty("hibernate.jakarta.cache.uri", cacheUri != null ? uriProvider.getJCacheUri().toString() : "");

if (cacheRegionFactory != null) {
properties.setProperty("hibernate.cache.region.factory_class", cacheRegionFactory);
}

if (cacheProvider != null) {
properties.setProperty("hibernate.javax.cache.provider", cacheProvider);
properties.setProperty("hibernate.jakarta.cache.provider", cacheProvider);
}

properties.putAll(overrideCacheProperties);
Expand Down
12 changes: 5 additions & 7 deletions common/src/main/resources/META-INF/persistence-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#L%
-->

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
<persistence-unit name="blPU" transaction-type="RESOURCE_LOCAL">
<mapping-file>config/bc/jpa/domain/SystemProperty.orm.xml</mapping-file>
<mapping-file>config/bc/jpa/domain/ModuleConfiguration.orm.xml</mapping-file>
Expand Down Expand Up @@ -54,16 +54,14 @@
<properties>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.transaction.flush_before_completion" value="false"/>
<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jcache.JCacheRegionFactory"/>
<property name="hibernate.javax.cache.provider" value="org.ehcache.jsr107.EhcacheCachingProvider"/>
<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jcache.internal.JCacheRegionFactory"/>
<property name="hibernate.jakarta.cache.provider" value="org.ehcache.jsr107.EhcacheCachingProvider"/>
<!-- See org.broadleafcommerce.common.extensibility.jpa.JCachePersistenceUnitPostProcessor for more information on the jcache.xml location -->
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
<property name="hibernate.generate_statistics" value="false" />
<property name="hibernate.archive.autodetection" value="false" />
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.id.new_generator_mappings" value="true"/>
<property name="hibernate.id.optimizer.pooled.prefer_lo" value="true"/>
<property name="hibernate.jdbc.log.warnings" value="false"/>
</properties>
</persistence-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#L%
-->

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
<persistence-unit name="blPU" transaction-type="RESOURCE_LOCAL">
<mapping-file>config/bc/jpa/domain/Category.orm.xml</mapping-file>
<mapping-file>config/bc/jpa/domain/CategoryXref.orm.xml</mapping-file>
Expand Down Expand Up @@ -150,8 +150,6 @@
<property name="hibernate.cache.use_query_cache" value="false"/>
<property name="hibernate.archive.autodetection" value="false" />
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.id.new_generator_mappings" value="true"/>
<property name="hibernate.id.optimizer.pooled.prefer_lo" value="true"/>
<property name="hibernate.jdbc.log.warnings" value="false"/>
</properties>
</persistence-unit>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#L%
-->

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">
<persistence-unit name="blPU" transaction-type="RESOURCE_LOCAL">
<mapping-file>config/bc/jpa/domain/Address.orm.xml</mapping-file>
<mapping-file>config/bc/jpa/domain/ChallengeQuestion.orm.xml</mapping-file>
Expand Down
28 changes: 6 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<hsqldb.database.starter.version>3.0.3-GA</hsqldb.database.starter.version>
<hsqldb.version>2.7.4</hsqldb.version>
<closure.compiler.version>v20240317</closure.compiler.version>
<hibernate.version>5.6.15.Final</hibernate.version>
<hibernate.version>6.4.10.Final</hibernate.version>
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
<jakarta.version>6.0.0</jakarta.version>
<jakarta-xml.version>4.0.0</jakarta-xml.version>
<jakarta-annotation.version>2.1.1</jakarta-annotation.version>
Expand Down Expand Up @@ -583,8 +583,8 @@

<!-- Hibernate Libraries -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers-jakarta</artifactId>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-envers</artifactId>
<version>${hibernate.version}</version>
<exclusions>
<exclusion>
Expand All @@ -599,26 +599,14 @@
<version>3.4.3.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core-jakarta</artifactId>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</exclusion>
<exclusion>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
Expand All @@ -630,18 +618,14 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-jcache</artifactId>
<version>${hibernate.version}</version>
<exclusions>
<exclusion>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down