소스 검색

Fix Deployment issue

Add jboss-deployment-structure.xml
Add dependency wildfly-ejb-client-bom
anthony.moreno 7 년 전
부모
커밋
969804d9e0

+ 6 - 0
GabonTelMobicashMobileAppHelper/pom.xml

@@ -18,6 +18,12 @@
         <finalName>Test_210_GabonTelMobicashMobileAppHelper</finalName>
     </build>
 	<dependencies>
+	    <dependency>
+            <groupId>org.wildfly</groupId>
+            <artifactId>wildfly-ejb-client-bom</artifactId>
+            <type>pom</type>
+            <scope>compile</scope>
+        </dependency>
 		<dependency>
 			<groupId>com.psi.common</groupId>
 			<artifactId>transactions</artifactId>

+ 29 - 0
GabonTelMobicashMobileAppHelper/src/main/java/com/psi/gabontel/mobileapp/thirdparty/helper/Test.java

@@ -0,0 +1,29 @@
+package com.psi.gabontel.mobileapp.thirdparty.helper;
+
+import java.util.Arrays;
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import com.psi.ussd.interfaces.UssdReceiverFunction;
+
+public class Test {
+
+    public static void main(String[] args) {
+//        final Hashtable<String, String> jndiProperties = new Hashtable<>();
+//        //jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
+//        jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
+//        jndiProperties.put(Context.PROVIDER_URL, "http://localhost:8280/wildfly-services");
+//        String jndi = "java:jboss/exported/Test_110_GabonTelUssdMfsInfo/GetMfsTypeBean!com.psi.ussd.interfaces.UssdReceiverFunction";
+//        try {
+//            final Context context = new InitialContext(jndiProperties);
+//            UssdReceiverFunction reference = (UssdReceiverFunction) context.lookup(jndi.replace("java:jboss/exported", "ejb:") );
+//            System.out.println(reference.requestFunc(Arrays.asList("moov","241060000")));
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+        System.exit(0);
+    }
+
+}

+ 14 - 0
GabonTelMobicashMobileAppHelper/src/main/webapp/WEB-INF/jboss-deployment-structure.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
+    <deployment>
+	    <exclusions>
+	    </exclusions>
+	    <dependencies>
+	        <module name="psi.eclipselink" />
+	        <module name="psi.oracle.jdbc" />
+	        <module name="org.apache.cxf" />
+	        <module name="org.apache.cxf.impl" />
+	        <module name="org.glassfish.javax.json" />
+	    </dependencies>
+    </deployment>
+</jboss-deployment-structure>