Skip to content

Commit

Permalink
#414: move to jakarta as far as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Ohr committed Sep 28, 2023
1 parent 18b2cfb commit cc27002
Show file tree
Hide file tree
Showing 643 changed files with 2,096 additions and 2,139 deletions.
2 changes: 1 addition & 1 deletion boot/ipf-atna-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openehealth.ipf.boot</groupId>
<artifactId>ipf-spring-boot</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<artifactId>ipf-atna-spring-boot-starter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion boot/ipf-fhir-r4-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openehealth.ipf.boot</groupId>
<artifactId>ipf-spring-boot</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<artifactId>ipf-fhir-r4-spring-boot-starter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.CorsFilter;

import javax.servlet.Filter;
import jakarta.servlet.Filter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import org.springframework.validation.annotation.Validated;
import org.springframework.web.cors.CorsConfiguration;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import java.util.*;

/**
Expand Down
2 changes: 1 addition & 1 deletion boot/ipf-fhir-stu3-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openehealth.ipf.boot</groupId>
<artifactId>ipf-spring-boot</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<artifactId>ipf-fhir-stu3-spring-boot-starter</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.CorsFilter;

import javax.servlet.Filter;
import jakarta.servlet.Filter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import org.springframework.validation.annotation.Validated;
import org.springframework.web.cors.CorsConfiguration;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import java.util.*;

/**
Expand Down
2 changes: 1 addition & 1 deletion boot/ipf-hl7-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openehealth.ipf.boot</groupId>
<artifactId>ipf-spring-boot</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<artifactId>ipf-hl7-spring-boot-starter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion boot/ipf-hl7v3-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openehealth.ipf.boot</groupId>
<artifactId>ipf-spring-boot</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<artifactId>ipf-hl7v3-spring-boot-starter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion boot/ipf-hpd-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openehealth.ipf.boot</groupId>
<artifactId>ipf-spring-boot</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<artifactId>ipf-hpd-spring-boot-starter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion boot/ipf-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openehealth.ipf.boot</groupId>
<artifactId>ipf-spring-boot</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<artifactId>ipf-spring-boot-starter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion boot/ipf-xds-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openehealth.ipf.boot</groupId>
<artifactId>ipf-spring-boot</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<artifactId>ipf-xds-spring-boot-starter</artifactId>
Expand Down
6 changes: 3 additions & 3 deletions boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.openehealth.ipf</groupId>
<artifactId>ipf</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<groupId>org.openehealth.ipf.boot</groupId>
Expand All @@ -19,8 +19,8 @@
<module>ipf-hl7-spring-boot-starter</module>
<module>ipf-hl7v3-spring-boot-starter</module>
<module>ipf-xds-spring-boot-starter</module>
<module>ipf-fhir-r4-spring-boot-starter</module>
<module>ipf-fhir-stu3-spring-boot-starter</module>
<!--<module>ipf-fhir-r4-spring-boot-starter</module>-->
<!--<module>ipf-fhir-stu3-spring-boot-starter</module>-->
<module>ipf-atna-spring-boot-starter</module>
<module>ipf-hpd-spring-boot-starter</module>
<module>ipf-xacml20-spring-boot-starter</module>
Expand Down
11 changes: 7 additions & 4 deletions commons/audit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.openehealth.ipf.commons</groupId>
<artifactId>ipf-commons</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down Expand Up @@ -59,16 +59,19 @@
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>${activemq-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<artifactId>activemq-client-jakarta</artifactId>
<version>${activemq-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<groupId>org.messaginghub</groupId>
<artifactId>pooled-jms</artifactId>
<version>${pooled-jms-version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@

package org.openehealth.ipf.commons.audit.queue;

import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageListener;
import jakarta.jms.TextMessage;
import org.openehealth.ipf.commons.audit.AuditContext;
import org.openehealth.ipf.commons.audit.DefaultAuditMetadataProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

import static java.util.Objects.requireNonNull;
import static org.openehealth.ipf.commons.audit.queue.AbstractAuditMessageQueue.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import org.openehealth.ipf.commons.audit.AuditContext;

import javax.jms.ConnectionFactory;
import javax.jms.Session;
import jakarta.jms.ConnectionFactory;
import jakarta.jms.Session;

import static java.util.Objects.requireNonNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
*/
package org.openehealth.ipf.commons.audit.queue;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.pool.PooledConnectionFactory;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
import org.messaginghub.pooled.jms.JmsPoolConnectionFactory;
import org.openehealth.ipf.commons.audit.DefaultAuditContext;
import org.openehealth.ipf.commons.audit.codes.EventOutcomeIndicator;
import org.openehealth.ipf.commons.audit.event.ApplicationActivityBuilder;
Expand All @@ -30,14 +28,14 @@
import org.slf4j.LoggerFactory;
import org.springframework.jms.listener.SimpleMessageListenerContainer;

import javax.jms.MessageListener;
import java.util.Locale;

import static org.junit.jupiter.api.Assertions.assertEquals;

/**
* @author Dmytro Rud
*/
@Disabled("JEE 10")
public class JmsAuditMessageQueueTest {

private static final Logger LOG = LoggerFactory.getLogger(JmsAuditMessageQueueTest.class);
Expand Down Expand Up @@ -80,18 +78,20 @@ public void tearDown() {

@Test
public void testActiveMQ() throws Exception {
var jmsConnectionFactory = new PooledConnectionFactory(JMS_BROKER_URL);
MessageListener messageListener = new JmsAuditMessageListener(auditContext);
var connectionFactory = new ActiveMQConnectionFactory(JMS_BROKER_URL);
var pooledConnectionFactory = new JmsPoolConnectionFactory();
pooledConnectionFactory.setConnectionFactory(connectionFactory);
var messageListener = new JmsAuditMessageListener(auditContext);

// Setup Consumer
var messageListenerContainer = new SimpleMessageListenerContainer();
messageListenerContainer.setupMessageListener(messageListener);
messageListenerContainer.setConnectionFactory(jmsConnectionFactory);
messageListenerContainer.setConnectionFactory(pooledConnectionFactory);
messageListenerContainer.setDestinationName(JMS_QUEUE_NAME);
messageListenerContainer.start();

// Setup producer
atnaQueue = new JmsAuditMessageQueue(jmsConnectionFactory, JMS_QUEUE_NAME, null, null);
atnaQueue = new JmsAuditMessageQueue(pooledConnectionFactory, JMS_QUEUE_NAME, null, null);
auditContext.setAuditMessageQueue(atnaQueue);

sendAudit();
Expand Down
4 changes: 2 additions & 2 deletions commons/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<parent>
<groupId>org.openehealth.ipf.commons</groupId>
<artifactId>ipf-commons</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package org.openehealth.ipf.commons.core;

import jakarta.xml.bind.annotation.XmlTransient;
import org.openehealth.ipf.commons.core.config.TypeConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.xml.bind.annotation.XmlTransient;
import java.util.HashMap;
import java.util.Map;

Expand Down
2 changes: 1 addition & 1 deletion commons/ihe/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.openehealth.ipf.commons</groupId>
<artifactId>ipf-commons-ihe</artifactId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
17 changes: 14 additions & 3 deletions commons/ihe/fhir/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>ipf-commons-ihe-fhir</artifactId>
<groupId>org.openehealth.ipf.commons</groupId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -16,6 +16,17 @@
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-server</artifactId>
<exclusions>
<exclusion>
<groupId>com.github.bbottema</groupId>
<artifactId>emailaddress-rfc2822</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.bbottema</groupId>
<artifactId>emailaddress-rfc2822</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
Expand Down Expand Up @@ -63,8 +74,8 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import ca.uhn.fhir.rest.api.server.RequestDetails;
import org.hl7.fhir.instance.model.api.IBaseBundle;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

/**
* Resource provider for batch requests or transaction requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import ca.uhn.fhir.rest.api.server.RequestDetails;

import javax.security.cert.X509Certificate;
import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.*;

Expand Down Expand Up @@ -102,7 +102,7 @@ protected Map<String, Object> enrichParameters(FhirSearchParameters parameters,
var headers = extractHttpHeaders(httpServletRequest);
enriched.put(Constants.HTTP_INCOMING_HEADERS, headers);

var cipherSuite = (String) httpServletRequest.getAttribute("javax.servlet.request.cipher_suite");
var cipherSuite = (String) httpServletRequest.getAttribute("jakarta.servlet.request.cipher_suite");
if (cipherSuite != null) {
enriched.put(Constants.HTTP_X509_CERTIFICATES, httpServletRequest.getAttribute(X509Certificate.class.getName()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import jakarta.servlet.ServletConfig;
import jakarta.servlet.ServletException;

/**
* HAPI FHIR {@link RestfulServer} implementation, adding a few configuration bits using servlet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
Expand Down
2 changes: 1 addition & 1 deletion commons/ihe/fhir/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>ipf-commons-ihe</artifactId>
<groupId>org.openehealth.ipf.commons</groupId>
<version>4.8-SNAPSHOT</version>
<version>5.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
Expand Down
Loading

0 comments on commit cc27002

Please sign in to comment.