Skip to content

Commit

Permalink
EntityManager uses jakarta package not javax
Browse files Browse the repository at this point in the history
  • Loading branch information
cppwfs committed Jan 2, 2024
1 parent 7cd9863 commit 25babdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public PlatformTransactionManager getTransactionManager() {
if (this.transactionManager == null) {
if (isDataSourceAvailable()) {
try {
Class.forName("javax.persistence.EntityManager");
Class.forName("jakarta.persistence.EntityManager");
if (this.context != null && this.context.getBeanNamesForType(EntityManager.class).length > 0) {
logger.debug("EntityManager was found, using JpaTransactionManager");
this.transactionManager = new JpaTransactionManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void testDefaultContext() throws Exception {
DefaultTaskConfigurer defaultTaskConfigurer = new DefaultTaskConfigurer(this.dataSource,
TaskProperties.DEFAULT_TABLE_PREFIX, localContext);
assertThat(defaultTaskConfigurer.getTransactionManager().getClass().getName())
.isEqualTo("org.springframework.jdbc.support.JdbcTransactionManager");
.isEqualTo("org.springframework.orm.jpa.JpaTransactionManager");
}

@Test
Expand Down

0 comments on commit 25babdf

Please sign in to comment.