Skip to content

Commit d1cd7e0

Browse files
committed
HSEARCH-3277 Avoid deprecated Hibernate ORM APIs
1 parent 9877a16 commit d1cd7e0

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

documentation/src/test/java/org/hibernate/search/documentation/search/query/QueryDslIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class QueryDslIT {
6161
@Before
6262
public void setup() {
6363
entityManagerFactory = setupHelper.start()
64-
.withProperty( AvailableSettings.JPA_SHARED_CACHE_MODE, SharedCacheMode.ENABLE_SELECTIVE.name() )
64+
.withProperty( AvailableSettings.JAKARTA_SHARED_CACHE_MODE, SharedCacheMode.ENABLE_SELECTIVE.name() )
6565
.setup( Book.class, Manager.class, Associate.class );
6666
initData();
6767
}

integrationtest/mapper/orm-cdi/src/test/java/org/hibernate/search/integrationtest/mapper/orm/cdi/CdiBeanResolutionIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private <T> void doTest(ExpectedScope expectedScope, CounterKeys counterKeys, Be
137137
int expectedInstances = ExpectedScope.SINGLETON.equals( expectedScope ) ? 1 : 2;
138138

139139
try ( @SuppressWarnings("unused") SessionFactory sessionFactory = ormSetupHelper.start()
140-
.withProperty( AvailableSettings.CDI_BEAN_MANAGER, cdiContainer.getBeanManager() )
140+
.withProperty( AvailableSettings.JAKARTA_CDI_BEAN_MANAGER, cdiContainer.getBeanManager() )
141141
.setup( IndexedEntity.class ) ) {
142142
backendMock.verifyExpectationsMet();
143143

integrationtest/mapper/orm-cdi/src/test/java/org/hibernate/search/integrationtest/mapper/orm/cdi/CdiExtendedBeanManagerBootstrapShutdownIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void successfulBoot() {
8080
} );
8181

8282
try ( @SuppressWarnings("unused") SessionFactory sessionFactory = ormSetupHelper.start()
83-
.withProperty( AvailableSettings.CDI_BEAN_MANAGER, extendedBeanManager )
83+
.withProperty( AvailableSettings.JAKARTA_CDI_BEAN_MANAGER, extendedBeanManager )
8484
.setup( IndexedEntity.class ) ) {
8585
// Hibernate Search should not have booted yet.
8686
backendMock.verifyExpectationsMet();
@@ -135,7 +135,7 @@ public void failedBoot() {
135135
} );
136136

137137
try ( @SuppressWarnings("unused") SessionFactory sessionFactory = ormSetupHelper.start()
138-
.withProperty( AvailableSettings.CDI_BEAN_MANAGER, extendedBeanManager )
138+
.withProperty( AvailableSettings.JAKARTA_CDI_BEAN_MANAGER, extendedBeanManager )
139139
.setup( IndexedEntity.class ) ) {
140140
// Hibernate Search should not have booted yet.
141141
backendMock.verifyExpectationsMet();
@@ -189,7 +189,7 @@ public void cancelledBoot() {
189189
} );
190190

191191
try ( @SuppressWarnings("unused") SessionFactory sessionFactory = ormSetupHelper.start()
192-
.withProperty( AvailableSettings.CDI_BEAN_MANAGER, extendedBeanManager )
192+
.withProperty( AvailableSettings.JAKARTA_CDI_BEAN_MANAGER, extendedBeanManager )
193193
.setup( IndexedEntity.class ) ) {
194194
// Hibernate Search should not have booted yet.
195195
backendMock.verifyExpectationsMet();
@@ -230,7 +230,7 @@ public void failedShutdown() {
230230
} );
231231

232232
try ( @SuppressWarnings("unused") SessionFactory sessionFactory = ormSetupHelper.start()
233-
.withProperty( AvailableSettings.CDI_BEAN_MANAGER, extendedBeanManager )
233+
.withProperty( AvailableSettings.JAKARTA_CDI_BEAN_MANAGER, extendedBeanManager )
234234
.setup( IndexedEntity.class ) ) {
235235
// Hibernate Search should not have booted yet.
236236
backendMock.verifyExpectationsMet();

integrationtest/mapper/orm/src/test/java/org/hibernate/search/integrationtest/mapper/orm/massindexing/MassIndexingCachingIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void setup(OrmSetupHelper.SetupContext setupContext) {
5757
backendMock.expectAnySchema( IndexedEntity.NAME );
5858

5959
setupContext.withPropertyRadical( HibernateOrmMapperSettings.Radicals.AUTOMATIC_INDEXING_ENABLED, "false" )
60-
.withProperty( AvailableSettings.JPA_SHARED_CACHE_MODE, SharedCacheMode.ALL.name() )
60+
.withProperty( AvailableSettings.JAKARTA_SHARED_CACHE_MODE, SharedCacheMode.ALL.name() )
6161
.withProperty( AvailableSettings.GENERATE_STATISTICS, "true" )
6262
.withProperty( AvailableSettings.USE_SECOND_LEVEL_CACHE, "true" )
6363
.withAnnotatedTypes( IndexedEntity.class );

integrationtest/mapper/orm/src/test/java/org/hibernate/search/integrationtest/mapper/orm/search/loading/SearchQueryEntityLoadingCacheLookupIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public void setup(OrmSetupHelper.SetupContext setupContext) {
9898

9999
setupContext.withProperty( HibernateOrmMapperSettings.QUERY_LOADING_CACHE_LOOKUP_STRATEGY,
100100
defaultCacheLookupStrategy )
101-
.withProperty( AvailableSettings.JPA_SHARED_CACHE_MODE, SharedCacheMode.ALL.name() )
101+
.withProperty( AvailableSettings.JAKARTA_SHARED_CACHE_MODE, SharedCacheMode.ALL.name() )
102102
.withConfiguration( c -> mapping.configure( c, model ) );
103103
}
104104

integrationtest/mapper/orm/src/test/java/org/hibernate/search/integrationtest/mapper/orm/search/loading/SearchQueryEntityLoadingMultipleTypesIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public void setup(OrmSetupHelper.SetupContext setupContext) {
117117
backendMock.expectAnySchema( Hierarchy8_A_C_Cacheable.NAME );
118118
backendMock.expectAnySchema( Hierarchy8_A_D_Cacheable.NAME );
119119

120-
setupContext.withProperty( AvailableSettings.JPA_SHARED_CACHE_MODE, SharedCacheMode.ENABLE_SELECTIVE.name() )
120+
setupContext.withProperty( AvailableSettings.JAKARTA_SHARED_CACHE_MODE, SharedCacheMode.ENABLE_SELECTIVE.name() )
121121
.withAnnotatedTypes(
122122
Hierarchy1_A__Abstract.class,
123123
Hierarchy1_A_B.class,

0 commit comments

Comments
 (0)