Update camel jms to using spring jms 75/39975/2
authorKajur, Harish (vk250x) <vk250x@att.com>
Thu, 29 Mar 2018 03:47:11 +0000 (23:47 -0400)
committerKajur, Harish (vk250x) <vk250x@att.com>
Thu, 29 Mar 2018 04:06:06 +0000 (00:06 -0400)
Issue-ID: AAI-586
Change-Id: Iac662424d9d912bfc1792c2a495821b0c9ff6339
Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
aai-client-loadbalancer/pom.xml
aai-core/pom.xml
aai-core/src/main/java/org/onap/aai/util/AAIApiVersion.java
aai-utils/pom.xml

index 5ed63d4..58454d6 100644 (file)
             <artifactId>spring-retry</artifactId>
             <version>1.2.1.RELEASE</version>
         </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty-codec-http</artifactId>
+            <version>4.0.29.Final</version>
+        </dependency>
     </dependencies>
 
     <dependencyManagement>
index c2f3410..67fafa4 100644 (file)
@@ -50,6 +50,7 @@
         <activemq.version>5.15.3</activemq.version>
         <jacoco.line.coverage.limit>0.50</jacoco.line.coverage.limit>
         <gremlin.version>3.2.2</gremlin.version>
+        <jetty.version>9.4.6.v20170531</jetty.version>
     </properties>
     <profiles>
         <profile>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>
             <artifactId>jetty-util</artifactId>
-            <version>9.4.2.v20170220</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-core</artifactId>
-            <version>3.0.6</version>
+            <version>${jetty.version}</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.module</groupId>
                 </exclusion>
             </exclusions>
         </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-jms</artifactId>
-            <version>2.15.5</version>
-        </dependency>
         <dependency>
             <groupId>org.powermock</groupId>
             <artifactId>powermock-module-javaagent</artifactId>
             <artifactId>gremlin-groovy</artifactId>
             <version>${gremlin.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-jms</artifactId>
+            <version>4.3.2.RELEASE</version>
+        </dependency>
     </dependencies>
 
     <!-- Plugins and repositories -->
index c26261a..b3e4add 100644 (file)
  */
 package org.onap.aai.util;
 
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.PhaseInterceptorChain;
-
 import org.onap.aai.exceptions.AAIException;
 
+import java.util.regex.Pattern;
+
 public class AAIApiVersion {
        
        private static final Pattern versionPattern = Pattern.compile("(^|\\/)(v\\d+)\\/");
@@ -42,29 +38,7 @@ public class AAIApiVersion {
        public static String get() throws AAIException {
                
                String apiVersion = null;
-               try {
-                       Message message = PhaseInterceptorChain.getCurrentMessage();
-                       String requestURI = (String) message.get(Message.REQUEST_URI);
-                       
-                       if (requestURI != null) {
-                               Matcher matcher = versionPattern.matcher(requestURI);
-                               if (matcher.find() && matcher.groupCount() >= 2) {
-                                       apiVersion = matcher.group(2);
-                       }
-                               if (apiVersion == null) { 
-                                       Matcher latestMatcher = latestVersionPattern.matcher(requestURI);
-                                       if (latestMatcher.find() && latestMatcher.groupCount() >= 2) {
-                                               apiVersion = AAIConfig.get(AAIConstants.AAI_DEFAULT_API_VERSION_PROP, AAIConstants.AAI_DEFAULT_API_VERSION);
-                                       }
-                               }
-                               
-                       }
-                       
-               } catch (Exception e) { 
-                       // TODO: we may want to log an error here
-               }
-               // TODO: should this check the value a little closer and look for a pattern?
-               if (apiVersion == null || !apiVersion.startsWith("v")) { 
+               if (apiVersion == null || !apiVersion.startsWith("v")) {
                        apiVersion = AAIConfig.get (AAIConstants.AAI_DEFAULT_API_VERSION_PROP, AAIConstants.AAI_DEFAULT_API_VERSION);
                        //apiVersion = AAIConstants.AAI_DEFAULT_API_VERSION;
                }
index 3775658..c44227a 100644 (file)
         </plugins>
     </build>
 
-</project>
\ No newline at end of file
+</project>